[MS Teams] I need help with sideloading my bot correctly.
I am trying to side load my bot but I am finding the process for constructing the manifest.json file confusing? I created a manifest like this:
{
"$schema": "https://statics.teams.microsoft.com/sdk/v1.0/manifest/MicrosoftTeams.schema.json",
"manifestVersion": "1.0",
"version": "1.0.0",
"id": "ID",
"packageName": "com.CORRECTURL",
"developer": {
"name": "Megan",
"websiteUrl": "https://website.com/",
"privacyUrl": "https://website.com/privacy",
"termsOfUseUrl": "https://website.com/app-tos"
},
"name": {
"short": "BotName"
},
"description": {
"short": "A Bot",
"full": "This is a bot."
},
"icons": {
"outline":"outline.png",
"color": "color.png"
},
"accentColor": "#FF0000",
"bots": [
{
"botId": "ID",
"needsChannelSelector": "false",
"scopes": ["personal", "team"]
}
]
}
... And the bot was successfully sideloaded. But when I try to chat with my bot I can't see it? The bot is added to my team but it is not being recognized for some reason. Is this because I forgot to add something to the manifest?
@megancooper Check out the official guide here: https://msdn.microsoft.com/en-us/microsoft-teams/sideload
@megancooper for reference are you using .NET or Node SDK?
Here's the full manifest schema reference which will help you validate your manifest. https://msdn.microsoft.com/en-us/microsoft-teams/schema
@nwhitmont I'm using .net
@nwhitmont I need help setting the bot up so members of my team can have a private conversation with the bot. Right now the bot is only available via @mentions in our main group chat. How can I specify this in the manifest? Thanks for the help.
Quick MS Teams bot deployment checklist:
- Did your O365 tenant administrator enable sideloading of apps for your organization?
- Did you create an app package
- Did you sideload your bot app into the relevant team?
@megancooper In your manifest file - replace "ID" (in both places) with your bot's Microsoft App ID that you used to register the bot.
{
"$schema": "https://statics.teams.microsoft.com/sdk/v1.0/manifest/MicrosoftTeams.schema.json",
"manifestVersion": "1.0",
"version": "1.0.0",
"id": "MICROSOFT_APP_ID_GOES_HERE",
"packageName": "com.CORRECTURL",
"developer": {
"name": "Megan",
"websiteUrl": "https://website.com/",
"privacyUrl": "https://website.com/privacy",
"termsOfUseUrl": "https://website.com/app-tos"
},
"name": {
"short": "BotName"
},
"description": {
"short": "A Bot",
"full": "This is a bot."
},
"icons": {
"outline":"outline.png",
"color": "color.png"
},
"accentColor": "#FF0000",
"bots": [
{
"botId": "MICROSOFT_APP_ID_GOES_HERE",
"needsChannelSelector": "false",
"scopes": ["personal", "team"]
}
]
}
@nwhitmont It wasn't an ID Issue, I redacted that for privacy. I did all these steps, and I think I figured it out. But now I'm getting an error that says:
Error while reading manifest.json: Invalid value(s) specified for icons.outline.filesize: "2098" Invalid value(s) specified for icons.color.filesize: "10450"
I've double checked both PNGs in my zip folder and they are the correct pixel sizes. My outline is 20x20 and color is 96x96. Is there another cause for this error?
Your image files are too large. There is a limitation on icons file size:
With the new sideloading process, the transparent .png icons that you reference in the manifest must now be smaller than ~1.5KB. Alternatively, you can reference the icon using a URL on a publicly accessible server, instead of a local path to icons inside the zip package: the size limit does not apply in this case.
https://msdn.microsoft.com/en-us/microsoft-teams/troubleshooting#error-while-reading-manifestjson
@nwhitmont Okay, thanks
@nwhitmont Sorry for all the questions but I'm still having this one issue. I can't mention my bot in the General chat for my team. It's added to the team, but for some reason isn't being recognized. I'd like for members to start a 1:1 with it but I'm not seeing it pop up.
Here is my final manifest.json:
{
"$schema": "https://statics.teams.microsoft.com/sdk/v1.0/manifest/MicrosoftTeams.schema.json",
"manifestVersion": "1.0",
"version": "1.0.0",
"id": "MICROSOFT_ID_REDACTED",
"packageName": "PKG_REDACTED",
"developer": {
"name": "Megan",
"websiteUrl": "https://website.com/",
"privacyUrl": "https://website.com/privacy",
"termsOfUseUrl": "https://website.com/app-tos"
},
"name": {
"short": "Bridget v0.0"
},
"description": {
"short": "A Bot",
"full": "This app displays information."
},
"icons": {
"outline": "outline.png",
"color": "color.png"
},
"accentColor": "#FFFFFF",
"bots": [
{
"botId": "MICROSOFT_ID_REDACTED",
"isNotificationOnly": false,
"needsChannelSelector": "true",
"scopes": [ "personal", "team" ]
}
]
}
And here is a snapshot of the bot in Teams:
But for some reason I still can't mention or chat with the bot? Thanks again and apologies
@megancooper I'm unable to reproduce the error. When I sideloaded my test bot into MS Teams (desktop app version) I was able to invoke the bot immediately using @BotName in any channel on the team. Are you using MS Teams web or desktop app?
@nwhitmont I'm using the desktop app
I have Microsoft Teams Version 1.0.00.13252 (64-bit) on Win 10.
what happens if you delete the bot app & sideload it again?
@megancooper You said above that the bot was able to be @mentioned in a team but not callable in 1:1, and then after re-sideloading you're not able to @mention it? Does it resolve the @mention by filling in the bot name? (Note too that the bot name would be the one from the Bot Framework registration.) In other words, is it a response issue, or can it not resolve the @botname? Happy to try myself if you want to PM the bot id.
@megancooper How's it going on this one? Are you still having issues?
@nwhitmont Sorry for my late response. I have fixed the issue.
@megancooper Thanks for the update. closing
@megancooper @nwhitmont How did you manage to resolve this? Apparently no matter what I do, I can't get Microsoft Teams to sideload my bot. This is what my manifest.json (app ID redacted) looks like:
{
"$schema": "https://statics.teams.microsoft.com/sdk/v1.0/manifest/MicrosoftTeams.schema.json",
"manifestVersion": "1.0",
"version": "1.0.0",
"id": "MY_REDACTED_APP_ID",
"packageName": "co.nagarjun.www",
"developer": {
"name": "Nagarjun Palavalli",
"websiteUrl": "http://nagarjun.co/",
"privacyUrl": "http://nagarjun.co/",
"termsOfUseUrl": "http://nagarjun.co/"
},
"name": {
"short": "ZipBot",
"full": "ZipBot"
},
"description": {
"short": "My bot description",
"full": "my bot description"
},
"icons": {
"outline": "icon-outline.png",
"color": "icon-color.png"
},
"accentColor": "#2ca9d6",
"bots": [
{
"botId": "MY_REDACTED_APP_ID",
"isNotificationOnly": false,
"scopes": [
"personal"
],
"commandLists": [
{
"scopes": [
"personal"
],
"commands": [
{
"title": "Help",
"description": "Learn how to use ZipBot within Microsoft Teams"
}
]
}
]
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"*.ngrok.io",
"*.herokuapp.com"
]
}
I created a zip folder on my Mac by CD'ing into the app package directory and doing zip -r -X "../app_package.zip" *. I believe this makes it so that there is no root folder inside the zip folder (which Microsoft Teams does not allow). Struggling with this issue for hours. Appreciate any help.