powerplatform-build-tools icon indicating copy to clipboard operation
powerplatform-build-tools copied to clipboard

Assign-user does not work with application user

Open imenos-wouter-forrier opened this issue 1 year ago • 3 comments

Hi, When I want to execute assign-user, I get following error: Error: Insufficient privileges to complete the operation. The authentication is done with a service principal.

#Get the client secret from the machine $appId = "xxx" $secret = "xxx" $tenantId = "xxx"

$environmentId = "xxx" $maker = "[email protected]"

#Create connection to the Power Platform tenant pac auth create --applicationId $appId --clientSecret $secret --tenant $tenantId --environment $environmentId

pac admin assign-user --environment $environmentId --user $maker --role 'Environment Maker'

Is this a bug?

imenos-wouter-forrier avatar Feb 29 '24 12:02 imenos-wouter-forrier

@snizar007 any update on this?

imenos-wouter-forrier avatar Dec 30 '24 09:12 imenos-wouter-forrier

This is still present - when attempting to add back users after an environment reset for ALM, assign-user consistently fails with [ 'Error: Insufficient privileges to complete the operation.' ]

kfallstrom avatar Oct 09 '25 00:10 kfallstrom

It appears that using the objectId for the user works

kfallstrom avatar Oct 09 '25 00:10 kfallstrom