Microsoft-authentication-library-for-dotnet: [Feature Request] Need samples or documentation to mimic Microsoft Teams SSO

Created on 1 Apr 2021  路  4Comments  路  Source: AzureAD/microsoft-authentication-library-for-dotnet

I would like to implement an SSO experience like Microsoft Teams for Windows does in latest versions.
I don't know how Teams implements SSO. I wonder if MSAL is involved at some point...

Describe the solution you'd like
I want my Desktop app to be able to save token or credentials for further launch : If user did not disconnects explicitly, user remains authenticated on next run, without any prompt.
When the user disconnects, I would like my app to list all available accounts on his own authentication form (no click required on a "Authentication with Microsoft" button).

Describe alternatives you've considered
None. just know about MSAL persistent token cache and wonder if it can help.
Maybe I have to look for Windows Credential Center ?

Additional context
Solution should works for a .Net Desktop App

answered question

All 4 comments

@geoffreygeslin
Please read https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/token-cache-serialization
It will explain why this is not done out of the box (several strategies are possible), and will give you advice to use the cross platform cache serialization

You might also want to use WAM. See https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/wam which will bring, on Windows, an even better SSO experience.

Teams use WAM, WAM is able to provide the best SSO experience possible on desktop.

@jmprieur @bgavrilMS I appreciate your answers and will check both WAM and token cache docs.

Do you know which component is used by Office desktop suite for SSO ?
I.E when I log in desktop Word, I will be directly authenticated in Excel, PowerPoint...

We build several desktop applications and SSO _between_ applications would also be appreciated for users.

I understand that you'd want to have SSO with applications.
I think you could get it with WAM or the system browser.
For the component used by the Office main apps, it's MSAL C++, which is not yet available to customers, but could be in the future.

Was this page helpful?
0 / 5 - 0 ratings