Hello, maybe someone has a hint for my issue.
I configured a service principal flow to access the Power Platform API, as described
here.
- I created an Entra ID app registration to get the service principal. ✅
- I granted the service principal access as Power Platform admin, as described here. ✅
Here is screenshot which proves that the SP has been added through the described way.
3. I even added the service principal as an application user to the environment, to be 100% sure that the Power Platform system knowns the app. ✅
Next, I use an access token for the endpoint api.powerplatform.com to get the
environments.
Here is the issue. The system sends an error that my service principal is unknown (which I added in step 2). I tested this with several api-versions, no difference.
The request cannot be completed because the principal in tenant xxxx with object id xxxx does not exist.
Just to note, the object ID 490ed601-d6d9-412c-b38c-60925c64859d is the Enterprise app from my service principal.
I have no clue why the API respond with that error, if the service principal is clearly in my Power Platform tenant.
I just want to add, I did the same steps with the Power Platform command New-PowerAppManagementApp (as described
here), which does the same as step 2. Same result.
Any idea what I missed?
Thanks Tobias