Getting this error while adding user "Insufficient privileges to complete the operation."

Harish Balagoni 1 Reputation point
2022-07-21T09:33:44.83+00:00

I need to add users into AD got these permissions.
223009-image.png

But I am getting these issue.
223063-image.png

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Sandeep G-MSFT 20,906 Reputation points Microsoft Employee Moderator
    2022-07-22T16:26:19.817+00:00

    @Harish Balagoni

    Thank you for posting your question in Microsoft Q&A.
    I see that you are getting an error while trying to add a user. I also see that you have already given specific permissions.
    Seems like you are using Microsoft Graph to perform this action and as we notice you have already got the permissions in place.

    The permission that you have given is a "User.ReadWrite.All, Directory.ReadWrite.All" under delegated permissions.
    To add a user, you will have to add the same permissions under application permissions as well.

    The required permissions are as below,

    223874-image.png

    Please add "User.ReadWrite.All, Directory.ReadWrite.All" permissions under application permissions as well.

    You can also refer below article for more details.
    https://learn.microsoft.com/en-us/graph/api/user-post-users?view=graph-rest-1.0&tabs=http#permissions

    Do let me know if you have any questions.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.