14.09.2017, 13:11 | #1 |
Участник
|
dynamicsnavax: Azure AD Authentication for Windows Applications
Источник: http://dynamicsnavax.blogspot.com/20...r-windows.html
============== In this post I will describe how you can get the login dialog to pop up when you are developing a windows desktop application. Below is an example of the dialog appearing. Below is a sample code how to acquire the token. string authorityUri = "https://login.windows.net/common/oauth2/authorize"; Uri redirectURI = new Uri("https://login.live.com/oauth20_desktop.srf"); AuthenticationContext authenticationContext = new AuthenticationContext(authorityUri); AuthenticationResult authenticationResult = authenticationContext.AcquireTokenAsync( ClientConfig.Default.ActiveDirectoryResource, ClientConfig.Default.ActiveDirectoryClientAppId, redirectURI, new PlatformParameters(PromptBehavior.RefreshSession)).Result; Add the redirect URI for https://login.live.com/oauth20_desktop.srf Reference: https://docs.microsoft.com/en-us/res...e-a-client-app Источник: http://dynamicsnavax.blogspot.com/20...r-windows.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|