Forum Discussion
Power BI Api - JWT Auth
HI Anonymous,
Have you turned on the option on the admin portal that allows the rest API to use service principal authorizations? If not, please turn on this option first.
BTW, current the service principal only supports some read-only admin APIs, please take a look at the following links to know more about these settings and limitations:
Enable service principal authentication for read-only admin APIs - Power BI | Microsoft Docs
Regards,
Xiaoxin Sheng
Hey there,
Thank you for your response.
API service principal was already enabled.
So I'm guessing I'm missing something else.
- Anonymous4 years agoNot applicable
HI Anonymous,
According to the error message, it seems like the issue is related to the client id('iss' which you used in code), perhaps you can take a look at the following link which mentions the OAuth 2.0 client credentials and client id:
OAuth 2.0 client credentials flow on the Microsoft identity platform | Microsoft Docs
BTW, you can also try to change your aud values to the value that the document mentions if it works:
https://login.microsoftonline.com/{tenantId}/v2.0 https: //login.microsoftonline.com/{tenantId}/oauth2/tokenRegards,
Xiaoxin Sheng