
Announcements
For my company i am building an app which enables us to create user accounts on our MSP tenants.
I am struggling however to understand which permissions i need in the Authentication and Token sequences using a web api in our Azure AD.
I am getting an "unauthorized" error and fail to understand why.
I have created an API registration according to the Microsoft documentation with the following permissions:
Created scopes:
And created an Enterprise application, although i am not sure if i need this.
Now i think im going wrong somewhere in the url to create an Auth token with the scope User Impersonation which gives the access to the Partner Center API, but again i am not sure: (tenant ID partly masked in this post for privacy reasons)
https://login.microsoftonline.com/XXXXXXX8328-44a9-9536-7d7f3d9e4410/oauth2/v2.0/authorize?client_id=f319f3f1-73c8-440e-8e35-09e50455364f
&response_type=code
&redirect_uri=https%3A%2F%2Flogin.microsoftonline.com%2Fcommon%2Foauth2%2Fnativeclient
&response_mode=query
&scope=api://f319f3f1-73c8-440e-8e35-09e50455364f/user_impersonation
&state=12345
An Auth token is succesfully created aswell as using that token in a flow with the Refresh token step.
Using the refresh token in the HTTP request to call the Partner center API is where it goes wrong as seen in the first screenshot.
So what am i missing and/or doing wrong ?
I have found alot of sites and documents about Microsoft Graph (and Partnercenter API) with PS, JAVA, REST API's but none which explain how to properly use it in Power Automate.
Hi @KennethKok ,
Did you manage to get anywhere with this? I think I am at a similar stage. This is my flow:
I don't know how to use the token from above in the flow below?
Are we stuck at the same stage?
Thanks,
David