Graph API authenticate as a user programmatically

后端 未结 2 493
青春惊慌失措
青春惊慌失措 2020-12-12 03:50

I\'m trying to get a specific user OAuth2 bearer token using HTTP POST request, and nothing seems to work.

login_url = \'https://login.microsoftonline.com/\         


        
2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-12 04:23

    For GraphAPI, resource is "https://graph.windows.net/"

    If you don't want to use ADAL, you might however take a look at the code for usage of "resource". This scenario is covered, so consider ADAL as a big sample :)

    Also, msrestazure has a UserPassCredentials instance that works too on GraphAPI.

提交回复
热议问题