web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Adding user to Sharepo...
Power Automate
Unanswered

Adding user to Sharepoint group with HTTP request

(0) ShareShare
ReportReport
Posted on by 431

I am trying to add a user to a Sharepoint group with HTTP request in Microsoft Flow/Power automate.

 

The Flow first creates an Azure AD user, then adds the user to AAD security group, assigns E2 license by adding to a AAD security group that is assigned E2 licensing, and then it is supposed to add the user to Sharepoint group.

The Flow runs and succeeds, but the user is not added to the group and is not allowed to log in to the Sharepoint site.

 

The other actions in the Flow are "Azure AD - Create user" and "Azure AD - Add user to group". They are performed, succeed and the user is indeed created and then added to the group.

 
If I run the Flow again with the same user, I get the error message:
{
  "status": 404,
  "message": "The user does not exist or is not unique.\r\nclientRequestId: 3243155b-57c4-4786-bad7-bcb68b96f459\r\nserviceRequestId: 16873b9f-20af-2000-30c6-331d92fc4d53",
  "errors": [
    "-2130575276",
    "Microsoft.SharePoint.SPException"
  ]
}
 
The user  is able to log in at login.microsoftonline.com. When they tgo to the Sharepoint site url, they get "User does not exist in the Sharepoint catalogue"
 
I have tested with different users and different Sharepint groups, and the result is the same for everyone.

 

The image only shows the HTTP request: I have made a new flow for testing only this part, since everything else in the original Flow works fine.

 

Namnlös.png

In the body, the user email is entered.

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @MrtnM 

     

    Make sure Group Id is correct. Also in your POST body make sure all details are correct.

     

    image.png

  • Jcook Profile Picture
    7,781 Most Valuable Professional on at
    Hello,

    Have you tried to use the action :
    Office 365 groups ?

    All SharePoint online sites are usually tied to a group in the back end.

    —Josh
    If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others
  • MM-05080756-0 Profile Picture
    431 on at

    Thanks,

    I got it to work simply by inserting a Delay of 90 minutes. Maybe a shorter time would do as well, but I'm not in the mood for testing 🙂

    Namnlöst-1.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard