Forum Discussion

xli629b's avatar
xli629b
Helper II
4 years ago

Adding Azure B2B Direct Connect users to workspaces

I am trying to add an external service principal (from another tenant) that is enabled to access our tenancy with B2B Direct Connect to my workspace.

After enabling inbound and outbound access for this service principal in External Identities > B2B direct connect, I was able to authenticate into my tenancy with the external service principal to access the API.

However, now I need to give the external service principal access to a workspace.

Adding it manually: In the Access tab of my workspace, I can't find the external service principal in the autocomplete.

Adding it via the API: I get the following when I try to add the service principal's object ID.
https://api.powerbi.com/v1.0/myorg/groups/<groupId>/users

{
  groupUserAccessRight: "Admin",
  identifier: "<object ID for service principal>",
  principalType: "App"
}

Response:

{
  "error": {
    "code": "InvalidRequest",
    "message": "Failed to get service principal details from AAD."
  }
}

 
Is it possible to use the Power BI REST API with external users with B2B Direct Connect, or is there no way for Power BI to work with users that are in another tenant's directory altogether (rather than guest users).

3 Replies