1
votes

I am getting an error while creating a user in active directory through pipeline Azure devOps. I am getting error like insufficient permissions to access to active directory.

Thanks.

1
What command are you using to do this? Can you show screenshots or snippets of the build definition?juunas
Hi @guna Sekhar Did you try out below answer, How was it going? Please let me know if there is any question.Levi Lu-MSFT

1 Answers

0
votes

you must be a User administrator or Global administrator to add or delete users in azure ad, as described here. So you need to sign in azure account as a User administrator for the organization.

Since you are creating user in azure devops pipeline. I guess you have a azure service connection set up in your azure devops. You probably use a service principle or user credentials to connect to your azure account.

So you need to check if the service principle or user credentials that you used in setting up the service connection has the administrator permission to add a user.

You can check the document here to review the roles assigned to the service principle and your account or add an administrator role assignments. enter image description here

For more information about how to create service principle check here.

here is the guide to create service principle with powershell

Check this thread to learn about how to assign roles to service principle with powershell.