简体   繁体   中英

how to get the azure active directory token for the externl user using the windows application

I Have Added the Gmail User to the Active Directory. For that user i tried to get token.As i asked in the quesion in stack overflow

not able to get the token from azure active directory by pass username and password for gmail user

but i failed to get the token using webapplication.

then i tried to get the token using the windows form application as in the microsoft documentation

https://github.com/Azure-Samples/active-directory-dotnet-desktop-msgraph-v2

again i falied for get token for gmail user. please help me to get the token for gmail(external user).can any one plese sujjest me to get the token.

In app.cs file of the sample application(git) chage the

private static string Instance = "https://login.microsoftonline.com/";

to

private static string Instance = "https://login.microsoftonline.com/{tennant}/oauth2/";

Your code will work for the external users also..

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