Forum Discussion
Anonymous
4 years agoNot applicable
403 error message while trying to hit PBI API (I am able to get the token)
Hi All! I am tryng to user the new service proncipal profile feature in order to publish datasets on multiple tenents using PBI API. I created an app registration, Azure AD group for the service pr...
- 4 years ago
The AAD token you are generating in
GetServicePrincipalToken
is not set with the right audience
make sure the token you are using is with the right audience for powerbi API's "https://analysis.windows.net/powerbi/api"
waqas_ahmed
3 years agoNew Member
To get the access token for service principal profile, you have to use the following endpoint:
https://login.microsoftonline.com/<<tenant_id>>/oauth2/token
The following 4 parameters should be passed to the body:
- grant_type = client_credentials
- client_id = Application (client) ID
- client_secret = client secret value from Azure app
- resource = https://analysis.windows.net/powerbi/api
Sample request from postman: