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 a user to a Mic...
Power Automate
Unanswered

Adding a user to a Microsoft Team or Office365 group

(0) ShareShare
ReportReport
Posted on by 37

Hello,

 

I'm having difficulties with adding users to an Office365 group.

These are my flows:

Flow 1: Takes the input from a Microsoft Form to a Sharepoint List.

Flow 2: Triggers whenever a new item is added to the Sharepoint list. Starts an approval. After the approval the user is created in Azure AD.

After the user is created in Azure AD I add the user to an office365 group using the Office365 groups -> Add member to group action.

I select the group from the drop down and I user the UPN based collected from the previous Azure AD -> create user action.

 

For some reason I keep getting this error: Action add user to group failed: Invalid target for navigation property update. URI must target an entity.

 

I already tried using the GUID but this gives me an error: Resource '......0-8beb-4300-ae3e-1ef9f543a14e' does not exist or one of its queried reference-property objects are not present. I used the Powershell Get-UnifiedGroup command to get this GUID.

 

 

Hopefully someone can help me solve this issue 🙂

Thanks a lot!

 

 

 

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

    Thanks for your answer! I found that post when doing some research to solve my issue. However the topic ends with a question.

    What source should I use to extract the UPN from?
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Michaelvds 

     

    image.png

     

    Thanks for your reply.

     

    Use Search for users.

     

     

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

    Have you tried to use the Office 365 Groups action instead?

    —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
  • Michaelvds Profile Picture
    37 on at

    Hello,

     

    So I just tried using the Search for users -> upn. This gives me the same error:

     

    {
    "error": {
        "code": "Request_BadRequest",
        "message": "Invalid target for navigation property update. URI must target an entity.",
        "innerError": {
          "request-id": "440538f1-b6ab-415c-a27b-1110d4f181d4",
          "date": "2020-03-05T14:11:29"
        }
      }
     
    Here's an overview of my flow:
     
    }flow.PNG
  • Jcook Profile Picture
    7,781 Most Valuable Professional on at
    Hi,
    The error is inside the apply to each loop. Can you open that in the run and post picture

    —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
  • Michaelvds Profile Picture
    37 on at

    Hi,

    Thanks for your assistance!addMember.PNG

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

    @Michaelvds 

    That is weird..

     

    Are you selecting the group from the dropdown list in the action?

     

     â€”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

  • Michaelvds Profile Picture
    37 on at

    Yes, I do.

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Michaelvds 

     

    Are you searching one user or multiple (Search for users v2)?

     

    Thanks

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard