This repository was archived by the owner on Jun 30, 2023. It is now read-only.
Repository navigation
User management
Jean-Marc Prieur edited this page Feb 13, 2018
·
2 revisions
ADAL.NET does not expose directly the notion of user from an authentication context. It does provide a UserInfo, as we've seen as a property of the AuthenticationResult in ADAL.NET.

If you don't have an AuthenticationResult, you can derive information about the users from the token cache by using the ReadItems() method, and selecting the properties of the token cache items related to users:
var users = authenticationContext.TokenCache
.ReadItems()
.Select(i => new { i.FamilyName,
i.GivenName,
i.DisplayableId,
i.UniqueId }).Distinct();To remove a user from the cache you can remove the TokenCacheItems which uniqueId has a given value, but this is not the end of the story as the Web View also keeps sign-in information about the user
- Home
- Why use ADAL.NET?
- Register your app with AAD
- AuthenticationContext
- Acquiring Tokens
- Calling a protected API
- Acquiring a token interactively
- Acquiring tokens silently
- Using Device Code Flow
- Using Embedded Webview and System Browser in ADAL.NET and MSAL.NET
- With no user
- In the name of a user
- on behalf of (Service to service calls)
- by authorization code (Web Apps)
- Use async controller actions
- Exception types
- using Broker on iOS and Android
- Logging
- Token Cache serialization
- User management
- Using ADAL with a proxy
- Authentication context in multi-tenant scenarios
- Troubleshooting MFA in a WebApp or Web API
- Provide your own HttpClient
- iOS Keychain Access