User management - AzureAD/azure-activedirectory-library-for-dotnet GitHub Wiki

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

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