Feb 10 2021 08:43 AM
After following the tutorial for Authentication here: https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-authentication?view=azure-bot-service...
I was able to configure 2 OAuth Connection Settings in the Bot Channels Registration
Connection1 : Microsoft Graph using Azure Active Directory v2
Connection 2: 3rd party API using Oauth 2 Generic Provider
From my message extension within the fetchTask handler
use the following code to attempt to get access tokens for both of these Connections
token1 = Context.adaptor.getUserToken(context, connection1)
if no token show auth openURL signin card
else
token2 = Context.adaptor.getUserToken(context, connection2)
if no token show auth openURL signin card
if both tokens: proceed with logic.
This almost works but will always return undefined for one of the tokens during login or it gets stuck in a loop, but on subsequent requests it is able to get both tokens from storage successfully.
I noticed some other applications have implemented logging into 2 connections successfully. (Jira)
Can anyone point me in a direction that will help me implement this behavior correctly.
Thank You
Feb 24 2021 07:05 AM
Hi @MatthewCohen,