Teams app install flow

Occasional Contributor

Hi,

I'm new to Microsoft apps and working on POC to port our Slack app to teams. I went through multiple examples and docs, but can't narrow down prerequisites for certain installation flows.

My use case:

1. User clicks 'Add to teams' for my app

2. I sign user in with SSO (done)

3. I either show built-in group selector to install app to, or use graph to see what groups person is in to show a pop up where the user can select group

4. I create a separate channel for my app

5. I post initial welcome Hero card with CTO button to that channel and add message extension

 

My bot has needsChannelSelector: true in the manifest, but in app store (added app to my org) I still see Add button, instead of Add to team. I added resourceSpecific permission for Application layer (TeamMember.Read.Group, Channel.Create.Group) but my graph still can't access /users/${userId}/joinedTeams due to permissions, throwing an error that only User.Read was passed.

 

I'm most likely lacking some basic understanding of scopes and permissions. Can somebody point me to a good example of a similar flow or an article? Is my flow even possible or I should simplify to not reading groups and creating channels and simply add bot to pre-selected channel? If so, how can I make app installation enforce channel selector?

 

Thank you!

5 Replies
We are looking at this, we will get back to you.

@Meghana-MSFT  Thank you, appreciate it a lot!

Could you please share your manifest with us? We would like to check the scopes of the bot added. Thanks.
Sure! I managed to add SSO with user consent through our API (sign up with Teams flow on our site), however still fighting with sign in and permissions dialog if user goes directly to app store and clicks install

{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.12/MicrosoftTeams.schema.json",
"manifestVersion": "1.12",
"version": "1.0.53",
"id": "bc5e5c57-11dd-4a4f-845a-546cd62f7dae",
"packageName": "com.microsoft.teams.matterapp",
"name": {
"short": "Matterapp",
"full": ""
},
"developer": {
"name": "Matterapp",
"mpnId": "",
"websiteUrl": "https://www.matterapp.com",
"privacyUrl": "https://matterapp.com/legal/privacy",
"termsOfUseUrl": "https://matterapp.com/legal/terms-of-service"
},
"description": {
"short": "Give Kudos to your teammates!",
"full": ""
},
"icons": {
"outline": "outline.png",
"color": "color.png"
},
"accentColor": "#343799",
"bots": [
{
"botId": "5796b166-ae84-41c8-9f09-5051b6439dde",
"needsChannelSelector": true,
"isNotificationOnly": false,
"scopes": [
"personal",
"team"
]
}
],
"composeExtensions": [
{
"botId": "5796b166-ae84-41c8-9f09-5051b6439dde",
"commands": [
{
"id": "giveKudos",
"type": "action",
"title": "Give Kudos",
"description": "Give Kudos to team",
"initialRun": false,
"fetchTask": true,
"context": [
"commandBox",
"compose",
"message"
]
}
],
"canUpdateConfiguration": false,
"messageHandlers": []
}
],
"validDomains": [
"token.botframework.com",
"c08b-2a01-e35-39f9-b0d0-a921-43c7-df8a-4e42.ngrok.io"
],
"webApplicationInfo": {
"id": "8b1c19b1-70ae-4b91-a1b8-7d7ce6386e77",
"resource": ""
},
"devicePermissions": [
"notifications"
]
}
@dmsaprykin - Thanks for sharing the information.
We will further investigate on this issue and get back to you.