Forum Discussion
AADSTS500011: The resource principal named http://analysis.windows.net/powerbi/api/ not found
Hi,
I have probably missed something when trying to get my acccess token. It is a server side application and I would like to use a service principal.
I tried to follow the example here, it seems easy https://community.powerbi.com/t5/Developer/How-To-Get-embed-token-using-Get-Post-only/m-p/294475#M8672 and if I construct a curl command out of it it I get my resource principal error.
curl -v -X POST --url 'https://login.microsoftonline.com/common/oauth2/token' -H "Content-Type:application/x-from-urlencoded" -d 'grant_type=password&scope=openid&client_id=[client id]&client_secret=[client secret]&resource=https%3A%2F%2Fanalysis.windows.net%2Fpowerbi%2Fapi%2F&username=[ pbi user]&password=[password]'
The answer from the server is cryptic to me.
{"error":"invalid_resource","error_description":"AADSTS500011: The resource principal named https://analysis.windows.net/powerbi/api/ was not found in the tenant named [tenante name]. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant.\r\nTrace ID: 111949e2-4379-42e0-a703-7bed59b82800\r\nCorrelation ID: 689604f3-573c-4329-8a88-5957e1a39397\r\nTimestamp: 2020-09-02 14:09:29Z","error_codes":[500011],"timestamp":"2020-09-02 14:09:29Z","trace_id":"111949e2-4379-42e0-a703-7bed59b82800","correlation_id":"689604f3-573c-4329-8a88-5957e1a39397","error_uri":"https://login.microsoftonline.com/error?code=500011"}
What can be wrong and how can it be corrected?
- Anonymous6 years ago
It was a simple misstake. I had a '/' too much at the end in http://analysis.windows.net/powerbi/api/.
2 Replies
- AnonymousNot applicable
It was a simple misstake. I had a '/' too much at the end in http://analysis.windows.net/powerbi/api/.