简体   繁体   中英

How to Authenticate UWP app using Current Windows LoggedIn user

Currently my business UWP app authenticate using AD username and password from users which is generally same as Windows logged-in User. I need to remove this requirement and let user login directly to app based on current Windows user. I've been searching lot and found it for WebSites but not for app. I'm using following client:

var filter = new HttpBaseProtocolFilter();
Windows.Web.Http.HttpClient client = new Windows.Web.Http.HttpClient(filter);
client.GetAsync(url);

Is there any resource using which windows single sign on authentication can be done in UWP app?

Edit:
Some solution are Azure directory specific, but in my case it may not be Azure directory always but it could be Enterprise Active Directory with Domain Credentials (ADFS) and user using UWP app will use the same credentials to login as Windows login credentials. So, I was looking for solution in which current windows loggedin user can login without entering credentials again. It could be similar to Chrome/IE browsers sign in automatically into intranet sites.

You can use the following sample as reference: Web Account Management Sample .

It is showing how to get a token for an Azure AD. It could be a good starting point.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM