cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
smerchant
Level: Powered On

Graph API - HTTP Auth

I am trying to use Graph API but I am struggling to get a token.  I used postman to get the token which worked fine.

 

I need to make a post request to graph API to create a group. 

 

Should I be https://login.microsoftonline.com/cbc8a2f1-a4da-4dac-95b6-221568205810/oauth2/v2.0/token or /authorize? and

Should I put client_id, secret etc. in the body?

 

I am making a post request to https://login.microsoftonline.com/tenentid/oauth2/token with client_id={clientID},scope=https://graph.microsoft.com/.default, client_secret={mysecret} and client_type=client_credentials

 

I also tried to follow this but this had no success. 

https://developer.microsoft.com/en-us/graph/docs/concepts/auth_v2_service

 

I am getting the following error:

 

  "error": "unauthorized_client",
  "error_description": "AADSTS70001:

 

   Bad Reqeust

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
smerchant
Level: Powered On

Re: Graph API - HTTP Auth

Managed to resolved this.  I needed to create web app rather than native app in the Azure and endpoint needed to be like:
https://login.windows.net/tenant/oauth2/token?api-version=1.0

1 REPLY 1
smerchant
Level: Powered On

Re: Graph API - HTTP Auth

Managed to resolved this.  I needed to create web app rather than native app in the Azure and endpoint needed to be like:
https://login.windows.net/tenant/oauth2/token?api-version=1.0

Helpful resources

Announcements
firstImage

Microsoft Flow Online Conference

Join us for a FULL day of FREE Microsoft Flow Sessions from some of the best minds in the industry!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 170 members 5,147 guests
Please welcome our newest community members: