Forum Discussion
Service principal authentication for Web Connection throws OAuth error
- 2 years ago
This issue is resolved as the Web V2 connection now allows for service principal auth. For those wondering, the "Token Audience URI" is the same thing as the "AAD Resource" and in this scenario, https://analysis.windows.net/powerbi/api is the correct value for that parameter.
Here is the complete screenshot:
Hi,
Maybe I can help a bit with the error message. "why it mentions OAUTH".
The authentication process needs to contact Azure and retrieve an authentication token for the service principal. Once Azure is contacted, this token is presented to the Power BI Admin API you are calling for authentication. Basically, this is an OAUTH authentication/authorization process.
The error message is clear: The service principal permission is denied. It's difficult to say if it's denied on the first step (while authenticating on Azure) or on the 2nd step (while authenticating against the power bi admin). But if I had to guess, it's the 2nd step. Permissions to access the Power BI Admin.
You mentioned you did this access from other places before, such as a notebook. I would double check if the information is all correct, because it's easy to mistype something: The tenantId, the service principal Id and the key.
If you double check it and everything is right, explaining why it works in one place and not in other is a bit more difficult. Maybe if you show both to compare we can come up with something.
Kind Regards,
Dennes
- jihool36703 years agoHelper I
Thanks for the detail. I'll post screenshots when I'm at my PC.
Prior to trying with a Fabric pipeline, I was successful in using an ADF copy activity using the same SP. The difference was I was able to specify an AAD resource when creating the linked service. Is that not relevant with Farbic?