-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
404 Not found when trying to use Teams SSO to get the user token #6625
Comments
I'm having the same problem when using the Emulator, the sample codes are not working because the GetToken endpoint is returning Not Found, so it is asking for authentication on every turn. |
We are seeing the same issue, any pointers on what can be done to mitigate this? |
@sandeepvootoori I got it fixed by asking the users to use the bot for the first time via the new teams client. The old client was the culprit |
We are having the same problem. Got any progress update? |
@brnowakowski not had any more information from Microsoft, they said they were 'tracking' it but yea I guess nothing will happen. You need to make sure people are logged out and use the new teams client to do the authentication first. |
We seem to have the same problem. We use the following code to get access token and the tokenResponse is sometimes null: We have noticed that the code above calls the following endpoint: https://api.botframework.com/api/usertoken/GetToken?userId=29%........&connectionName=OAuthBotSettings&channelId=msteams&code= There is clearly problem with that endpoint, which never returns any specific response with 404 status code explaining what specifically was not found: user/conversation, connection or something else. Logging in new teams client (web) does not solve the problem in my case. |
@Aspyryan see if this comment by me solves your issue, some IdP deny the request if the client is marked as confidential (aka should use client secrets). The problem is Azure Portal requires you to type in a secret, but it is not sent in the request. In other words, IdP expects client secret but the Token Service doesn't send it. The solution is to DISABLE confidential clients when using Bot Framework OAuth2. IMHO this library has not been receiving the attention it deserves. A lot of issues are ignored. |
@atmoraes1 How would I Disable the confidential clients? It stopped working again :/ |
I've been struggling with this same issue for weeks on Nodejs SDK. Does anyone have any update or possible solution? @atmoraes1 I tried to enable |
i got the the same error,dose anyone have some solution? |
Version
SDK Platform: C#
SDK Version: Bot Builder 4.21.0
Active Channels: Teams
Deployment Environment: Azure Bot Service
Describe the bug
404 NOT FOUND when trying to GET the user token from teams with this request:
https://api.botframework.com/api/usertoken/GetToken?userId={user-id}&connectionName=BotOAuth&channelId=msteams
When using my own id I can get a token, but my colleagues cannot, when I send them a link to "test connection" from the Azure Bot page, they can get their token perfectly fine.
Expected behavior
It should return 200 with a token, just what happens with my user-id or return a prompt to allow access?
Additional
I am using the
AdapterWithErrorHandler : CloudAdapter
withbase.Use(new TeamsSSOTokenExchangeMiddleware(storage, configuration["ConnectionName"]));
and the main code can be found below. The tokenResponse is null due to the internal request getting a 404 NOT FOUND response.Azure config:
The text was updated successfully, but these errors were encountered: