-
Notifications
You must be signed in to change notification settings - Fork 500
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
[MS Teams] - Single-tenant bots don't work in new Teams client #11153
Comments
Hi pavelperkin! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies. Best regards, Teams Platform |
The 401 Unauthorized error indicates that the access token you are using does not have the necessary permissions to perform the action you are trying to execute. Since you are using delegated permissions, you need to ensure that the token you acquire has the required scopes to post messages to a conversation. You should decode the access token you obtained from the OAuth 2.0 token endpoint using a tool like jwt.ms to verify the scopes included in the token. Make sure it includes the necessary permissions to post messages to conversations. |
Thank you @Prasad-MSFT {
"typ": "JWT",
"alg": "RS256",
"x5t": "qXXXs",
"kid": "qXXXs"
}.{
"aud": "https://api.botframework.com",
"iss": "https://sts.windows.net/7XXX0/",
"iat": 17......92,
"nbf": 17......92,
"exp": 17......92,
"aio": "EXXXAA=",
"appid": "2XXX8",
"appidacr": "1",
"idp": "https://sts.windows.net/7XXX0/",
"idtyp": "app",
"oid": "3XXX5",
"rh": "0.AXXXry7AAA.",
"sub": "30XXXb5",
"tid": "7XXX0",
"uti": "AXXX3AA",
"ver": "1.0",
"xms_idrel": "7 12"
} Which value are you referring to? To obtain this token, I am sending a POST request to {
"grant_type": "client_credentials",
"client_secret": "XXX",
"client_id": "YYY",
"scope": "https://api.botframework.com/.default"
} And the response comes: {
"token_type": "Bearer",
"expires_in": 3599,
"ext_expires_in": 3599,
"access_token": "eyXXX1w"
} |
Sure. Because my app is a single-tenant application, I get Body:
|
@Prasad-MSFT can you pelase comment on my response. Thank you in advacne |
@pavelperkin - Could you please confirm whether or not you have added your bot to the Teams before running the REST API to POST messages? |
Steps to reproduce
I have a multi-tenant bot that I'd like to convert into single-tenant.
This bot uses REST API and delegated permissions - built from scratch without using any frameworks.
I was able to get an access token using
https://login.microsoftonline.com/TENANT-ID/oauth2/v2.0/token
endpointBut I can't post even a simple "Hello World" message using this token to perform requests to
https://smba.trafficmanager.net/teams/v3/conversations/CONVERSATION-ID/activities
The response I get is 401 Unauthorized
Expected behavior
Single-tenant bots work exactly like multi-tenant bots
Actual behavior
Single-tenant bots don't support basic functionality
Error details
No response
The text was updated successfully, but these errors were encountered: