cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

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
Helper I
Helper I

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

View solution in original post

1 REPLY 1
Helper I
Helper I

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

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (24,831)