Forum Discussion
Qondor_AM
4 years agoNew Member
Gateways and Datasources with Service Principal Profile
How do I give my service principal profile access to a gateway datasource? I'm currently trying to call https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/add-datasource-user with gatew...
- 4 years ago
Problem was solved by sending the correct object id as "identifier" to the API. Ref https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id
Qondor_AM
4 years agoNew Member
Problem was solved by sending the correct object id as "identifier" to the API. Ref https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id
BIBB
1 year agoAdvocate I
Thanks, this was useful, I will only add this in case someone else needs it. The correct payload for a service principal profile is the one below:
{
"datasourceAccessRight": "Read",
"identifier": "{{Object ID}}", //fix, this is the enterprise application
"principalType":"App", //enterprise application
"profile": {
"id": "{{Service Principal Profile ID}}",
"displayName": "{{Service Principal Profile Name}}" //this is optional.
}
}