Hi, I'm consistently getting an error trying to add an AAD Group to a V2 workspace using the AddUserAsAdmin API. Adding a single user via its email address works fine. Adding a group interatively...
ed-freeman
6 years agoAdvocate II
Hi v-qiuyu-msft ,
The OP was asking about the Admin API: https://docs.microsoft.com/en-us/rest/api/power-bi/admin/groups_adduserasadmin
When using an AD Security Group (not mail-enabled), this endpoint doesn't work.
For example:
A POST to https://api.powerbi.com/v1.0/myorg/admin/groups/{groupId}/users
with the body:
{
"groupUserAccessRight": "Member",
"displayName": "<Group_Name>",
"identifier": "<object_id>",
"principalType": "Group"
}
results in the response:
{
"error": {
"code": "InvalidRequest",
"message": "Parameter PrincipalType or Identifier is missing or invalid"
}
}
The other API that you linked to (https://docs.microsoft.com/en-us/rest/api/power-bi/groups/addgroupuser) seems to work fine.
Why doesn't the Admin API work?
Thanks,
Ed