microsoft-authentication-library-for-dotnet
                                
                                 microsoft-authentication-library-for-dotnet copied to clipboard
                                
                                    microsoft-authentication-library-for-dotnet copied to clipboard
                            
                            
                            
                        [Feature Request] AcquireTokenByIntegratedWindowsAuthentication + WAM should just log in the default user
AcquireTokenSilent(PublicClientApplication.OperatingSystemAccount)
Similarly, if I am logged in as [email protected] and I say, app.AcquireTokenSilent(scopes, loginHint: "[email protected]") it should just work.  Right now, I have to explicitly compare the loginHint to the current UPN and instead call AcquireTokenSilent(scopes, PublicClientApplication.OperatingSystemAccount)
https://github.com/GitCredentialManager/git-credential-manager/pull/830/files
I see three different ways to login as the current user:
- AcquireTokenByIntegratedWindowsAuthentication
- AcquireTokenSilent(PublicClientApplication.OperatingSystemAccount)
- AcquireTokenSilent( loginHint: currentUser.ToString())
Ideally there would be 1 API that MSAL consumers would call and MSAL would attempt the right ones. #3593 brings the MSAL API closer to this by falling back to #2 when #3 is called and would fail.
It's a good candidate for a higher level API, like in Microsoft.Identity.Web