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 / "Add user to group" (A...
Power Automate
Answered

"Add user to group" (Azure AD) does not accept user ID retrieve with "Get User"

(0) ShareShare
ReportReport
Posted on by 5

I created a flow that gets an email address (for a person already in Azure AD) and should add them to several AD groups.

 

The sequence is:

AzureAD: Get User - passing in email address (triggered by SharePoint list add)

AzureAD: Add User to Group - Passing in:

  - The ObjectID of the AD mail-enabled security group (retrieved using PowerShell Get-AzureADGroup command)

  - The id value returned by the "Get User" (where id is described as "a unique identifier for the user")

 

This results in an 400 Bad Request error with the message: Unable to update the specified properties for objects that have originated within an external service

 

The only doc I can find does not specify if this connector is limited to specific types of AD groups: https://docs.microsoft.com/en-us/connectors/azuread/

 

So, the most likely problem is that I'm not passing in the correct values. Is that it? Or is it that I can't add users to mail-enabled security groups? Thanks.

Categories:
I have the same question (0)
  • Verified answer
    PieterVeenstra Profile Picture
    on at

    HI @T4S-Rick,

     

    I tried the same where inside my flow I first run a create group. This givces me the ID of the group created and then I add my users to that group.

     

    This all works.

     

    The Get group neeed to have the id to get the rest of the group details. You could check if this id matches the one you generated with PowerShell.

     

     

    You should probably try with a flow that looks a bit like this:

     

    UserGroupFlow.PNG

  • rmcsmile Profile Picture
    31 on at

    Just a heads up on this issue.  I confirmed with the Flow team that adding users to mail enabled security groups is not supported at this time.  There's another post on Flow Ideas to get this fixed:  https://powerusers.microsoft.com/t5/Flow-Ideas/Azure-AD-Add-user-to-mail-enabled-security-group/idi-p/54133

     

    Please vote!

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard