I have a question while trying to add WorkSpace Role Assignment through Fabric Rest API, but getting the below error. In the id , adding the Client-id of Service principal (App-Registrations Azure). Can anyone guide in it.
$WorkSpaceRolePayload = @{
principal = @{
"id" = "client-id"
"type" = "User"
}
role = "Member"
}
Write-Host "WorkSpaceRolePayload" : $WorkSpaceRolePayload
Error -
{ , "errorCode":
| "PrincipalNotFound", "moreDetails": [ { "relatedResource": {
| "resourceId": "xxxx",
| "resourceType": "Principal" } } ], "message": "The
| provided principal was not found", "relatedResource": {
| "resourceId": "xxxx",
| "resourceType": "Workspace" } }