cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

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

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

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

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

View solution in original post

2 REPLIES 2
Highlighted

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

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

View solution in original post

Highlighted
Advocate I
Advocate I

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

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-...

 

Please vote!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,359)