Teams SSO in published azure app service

Jasper Baetslé 65 Reputation points


I am trying to publish my chatbot for internal usage in my company but I am having problems related to the teams-sso. When trying to get the token in the following function:

protected override async Task OnMessageActivityAsync(ITurnContext
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,617 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,064 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,401 questions
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 15,791 Reputation points Microsoft Employee

    @Jasper Baetslé It seems like the issue is related to the user's token not being retrieved successfully. Since you mentioned that the token response is null for your colleagues, it could be that there is an issue with the authentication process for them.

    One possible reason for this could be that the application is not granted permission by the Entra ID admin for your colleagues. You may want to double-check the permissions and ensure that the necessary permissions are granted to the application for all users.

    Another possible reason could be that there is an issue with the TeamsSSOTokenExchangeMiddleware that you are using. You may want to check if the middleware is properly configured and if it is working as expected.

    Regarding the 404 error that you are seeing, it could be that the user ID or connection name is incorrect. You may want to double-check the values that you are passing to the API and ensure that they are correct.

    To further debug the issue, you may want to try logging the requests and responses to see if there are any errors or issues that are being returned. You can also try using the OAuth card to retrieve the token manually and see if that works for your colleagues.

    0 comments No comments