Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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#M86... 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?
Solved! Go to Solution.
It was a simple misstake. I had a '/' too much at the end in http://analysis.windows.net/powerbi/api/.
I ran into this problem when trying to connect Project for the Web to Power BI via the Github Template. And it was a similar 'simple' mistake. I forgot to put https:// in front of the Common Data Service/Dataverse URL.
It was a simple misstake. I had a '/' too much at the end in http://analysis.windows.net/powerbi/api/.
User | Count |
---|---|
5 | |
5 | |
3 | |
2 | |
2 |
User | Count |
---|---|
9 | |
7 | |
4 | |
4 | |
4 |