AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Create a bot with appstudio4/15/2023 ![]() Var username = ((TeamsChannelAccount)member).UserPrincipalName Īs well as the user ID, tenant ID and service URL that we saw we needed before, I’m also pulling out one more bit of information – the user principal name ( This is so I can target the correct Teams user based on the username we have in D365. I’m going to use this code to get the values I need: var teamConversationData = () I’m going to switch to use the OnMembersAddedAsync method that’s currently being used to trigger the welcome message so I can get the IDs straight away, without having to wait for the user to do anything. Last time I used the OnMessageActivityAsync to get the ID when I sent a message. When a user installs my app (or I install it for them), it will automatically start a new conversation with my bot and I can grab the user ID and other details I need. A few seconds later my app appeared in the list: Getting User IDs Next, in the Teams admin site, I went to “Teams apps” > “Manage apps”, clicked “Upload” and selected my zip file. On the “Test and distribute” tab I clicked Download to get the zip file for my app. ![]() ![]() Listing in the App Catalogueīack in the App Studio app in Teams, I went back to the Manifest Editor and selected my existing app. To get this to work I need to install my Teams app for the other users via Microsoft Graph, and for that to work I need to get my (currently private) app listed in my organisation’s app catalogue. For my real-life scenario I need to be able to push notifications to users that haven’t interacted with my bot before. Last time I proved I could send a proactive message to myself, but I needed my user ID that I could only get after I’d started a conversation with the bot.
0 Comments
Read More
Leave a Reply. |