Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Suggested answer

Teams Channel Agent handoff Authentication Issue

Posted on by 6

Hello everyone,

I'm currently using Copilot Studios to create a bot, which I have connected to my Microsoft Teams channel and Dynamics 365 Omnichannel (I'm on a trial version of Dynamics 365). While the setup seems to work fine from the Omnichannel side, the bot doesn't initiate conversations in Microsoft Teams.

Here are the key details:

  1. Bot Created in Copilot Studios:

    • The bot was created using Copilot Studios, and it's functioning correctly when tested in the bot framework environment.
    • I tested with Chat Demo and my own bot and it works perfectly. 
  2. Teams Integration:

    • I added the bot to a Teams channel following the proper steps and connected it to Dynamics 365 Omnichannel.
    • I also made sure that the bot ID was correctly set in both Teams and Dynamics 365.
  3. Login Button Issue:

    • On the Teams side, users are not able to initiate conversations because the login button does not appear.
    • I have configured the OAuth 2.0 settings in Azure AD, using bot's ID generated from Omnichannel Teams Channel set up, I added the bot's client ID and resource URI, and granted all necessary permissions (like User.Read and openid).
    • Despite these configurations, when users try to interact with the bot in Teams, they are prompted to "login," but the login button does not appear. I can see that they are prompted for log in from agent workspace side, but from user's side it seems like a one way conversation. 
    • I tried testing out and removing manual authentication from Copilot Studios and with those settings bot was working inside teams. 

Has anyone experienced similar issues with Teams bot authentication and Dynamics 365 integration? Are there specific settings I might have missed that could affect the login process in Teams?

Any help would be greatly appreciated!

Thank you!

Categories:
Screenshot 2024-1...
Screenshot 2024-1...
  • CU10091525-0 Profile Picture
    CU10091525-0 6 on at
    Teams Channel Agent handoff Authentication Issue
    @AmitKatariya007
     
    Thank you for your reply. I tried all the recommended steps but the issue still persists. When I created the Client ID for the bot I did not use the bot ID generated from Omnichannel. Should I use the same bot ID for client ID? 
  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 6,912 Moderator on at
    Teams Channel Agent handoff Authentication Issue
    It sounds like you've covered the essential configurations, but the missing login button often indicates an issue with Teams channel authentication and token handling. Here are some specific areas to double-check:
     
    1. OAuth Connection Name in Omnichannel and Teams:
     
    Ensure that the OAuth connection name in both Teams and Dynamics Omnichannel matches exactly. In Teams, go to your bot's settings, find the "OAuth Connection" configuration, and confirm it’s consistent with what’s set up in Dynamics.
     
    2. Scope Permissions:
     
    Double-check that your Azure AD permissions (e.g., User.Read, openid) apply both in the Bot Registration and App Registration sections. The Bot Channel Registration may sometimes need additional permissions separately applied if you’re using Teams and Dynamics in parallel.
     
    3. Session Initiation Policy:
     
    Microsoft Teams bots occasionally need an initiation message or conversation update event to trigger the authentication. Try setting up a proactive message in Copilot Studios that prompts users in Teams, as this might kickstart the conversation and trigger the login button.
     
    4. Bot Framework Authentication Setting in Omnichannel:
     
    In Dynamics 365 Omnichannel, navigate to the Bot Framework Authentication settings and ensure you’ve selected the correct OAuth Provider and Authentication Settings. Any discrepancy here can cause issues in token negotiation between Teams and Dynamics.
     
    5. AAD Redirect URI:
     
    Check the redirect URIs in Azure AD for the bot to ensure Teams-specific URIs are included. Add https://token.botframework.com/.auth/web/redirect if it’s missing.
     
    6. Browser Cache/Cookies in Teams:
     
    In some cases, Teams users need to clear their cache or cookies. This can also be done by signing out fully and back into Teams.
     
    Finally, to isolate further, since you mentioned removing manual authentication in Copilot Studios resolved the issue, it could suggest that Copilot’s manual authentication settings are clashing with Teams.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,665 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,971 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,150

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans