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
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”.
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 -