Forum Discussion
Teams App Authentication Workflow across multiple devices
muditsaxena - Looks like we can not achieve this kind of authentication flow because if you logged-in to any device it stores the authentication details in a cache or memory on that particular device.
So it will always ask for authentication details at least for first time on different devices.
But you can implement SSO where if you are already logged-in to your Teams client, it will not ask for authentication for your tab or bot again on different device.
Single sign-on support for tabs - Teams | Microsoft Docs
Thanks,
Chetan Sharma
-------------------------------------------------------------------------------------------
If the response is helpful, please click "Mark as Best Response" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.
We have our own OAuth flow, so are you suggesting we use SSO flow using AAD?
Second, if you look at already published apps like `Jira Cloud` on Teams, they also have their own OAuth flow despite that they are able to achieve the multi-device flow i.e sign-in once on one device and use on other devices. So, how is that achieved?
- ChetanSharma-msftDec 08, 2021Microsoftmuditsaxena - There are multiple ways to implement Authentication.
How are you implementing the authentication?
Could you please share the steps or doc ?
Below are the reference docs for implementing authentication flow in Bot/Tab:
https://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/authentication/auth-flow-bot
https://docs.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/authentication/auth-flow-tab- muditsaxenaDec 08, 2021Copper ContributorWe are using Tab based auth flow
https://docs.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/authentication/auth-flow-tab- ChetanSharma-msftDec 09, 2021Microsoftmuditsaxena - Could you please try with silent authentication as below:
https://docs.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/authentication/auth-aad-sso
Sample code:
https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-sso/csharp