cancel
Showing results for 
Search instead for 
Did you mean: 

Error create Teams OAuth2 User Account

pete
New Contributor

trying to create a connection to teams using the Teams OAuth2 User Account so we can send a message to a channel, we can create a Teams OAuth2 Application Account which connects but struggling to get the User one set up.

under “Auth endpoint config” section we have added
image

but when i try to auth we get the following:
image

if i change the value to a scope we have ceated in AAD when i click on the Authorize button a new tab opens you see the azure auth screen before it redirects with and error and closes…

what are we meant to put in the the Auth endpoint section to get this to work???
thanks

2 REPLIES 2

ddellsperger
Employee
Employee

Application Accounts can only use the scope with value .default and the scope necessary has to be set up via the application within the Azure Portal.

The User Accounts for all of the Microsoft snap packs need the scope defined on the Token and Authentication endpoints, the Auth endpoint scope needs to match the scopes required to work with the apis required, you’ll need to use scope on both the Auth Endpoint and Token Endpoint and it needs to be space-separated with all of the scopes required for the access you need (including offline_access in order to get a refresh token). in this case, you might need offline_access, Chat.SendMessage and a few others, so you’ll need to define them all. What you see in our docs under “Token Endpoint Configuration” as far as scope goes also applies to the “Auth Endpoint Config”.

https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1576271954/Teams+OAuth2+User+Account

sreddi
Employee
Employee

Hi Pete,
Scope is different for OAuth2 User account and OAuth2 Application account. We need to create an application in Azure Portal and need to add Delegated as well Application permission.
Azure Portal Application / Delegated Permission -
image
Also I am attaching the OAuth2 User and OAuth2 Application Snap settings
image
image