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

Flow failed when calling createPlan graph API

I want to create a plan of Microsoft Planner through calling graph api in an HTTP action. I followed the graph api example https://docs.microsoft.com/en-us/graph/api/planner-post-plans?view=graph-rest-1.0&tabs=http#request , it worked in Graph Explorer but failed in Flow. I've granted the required delegated permission in my Azure AD App, but it still said something about Unauthorized. It both failed with v1.0 and beta. Anyone can help me? Here is the whole error:Capture1.PNG

 

My Flow:Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

HI @Zhangzhonghao ,

 

I think you need to change the authentication type on your end in the HTTP request.

image.png

 

After this is done, then attempt to perform the call using the bearer token from the previous action:

 

image.png

 

Hope this helps!

 

Regards,

Ricardo

View solution in original post

6 REPLIES 6
rimatos
Microsoft
Microsoft

Hi @Zhangzhonghao ,

 

I believe this is due to the permissions, since the Planner REST action does not support application permissions, so you wont be able to authenticate using client ID and secret I believe.

 

image.png

 

Regards,

Ricardo

@rimatos Thanks for your Information! I remembered I have granted the Azure AD App with the required delegated permission, why it doesn't get authenticated? 

  Capture.PNG

@rimatos So is there a way to call this api in flow?

HI @Zhangzhonghao ,

 

I think you need to change the authentication type on your end in the HTTP request.

image.png

 

After this is done, then attempt to perform the call using the bearer token from the previous action:

 

image.png

 

Hope this helps!

 

Regards,

Ricardo

View solution in original post

@rimatos  Thanks for your guidance! Currently, I use the "Active Directory OAuth" as my Authentication type. Do you mean that I should select "None" as the type and get the bearer access token, then pass it to the next http request to create plan? Actually, I've tried this way, but the body is different from yours when getting the access token.

Capture.PNG

Another question is how your "Show advanced options" looks like, in other word, how do you authenticate the HTTP request of getting access token. 

 

I'll try this way again with your body sample. Thank you very much for providing this information here!

@rimatos so much grateful for your help! Finally, I got the flow pass following your steps provided here. Thanks again!

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (32,454)