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 / Graph Api Custom Conne...
Power Automate
Unanswered

Graph Api Custom Connector - Update Group

(0) ShareShare
ReportReport
Posted on by 89

Hello,

 

I'm using Update Group - Graph Api in Custom Connector and I'm passing JSON body

{
"autoSubscribeNewMembers": true
}

But when I use this with create group and update group together it saysig "InvalidGroupId" though the groudid is correct.
Any suggestions?

 

 

Categories:
I have the same question (0)
  • wskinnermctc Profile Picture
    6,519 Moderator on at

    Can you show the json? You might be missing a comma , or quote " somewhere?

  • REENASH Profile Picture
    89 on at

    @wskinnermctc , Here is the json

    {
    "requests": [
    {
    "headers": {
    "Content-Type": "application/json"
    },
    "id": 1,
    "method": "PATCH",
    "url": "/groups/@{outputs('Create_Group')?['body/id']}",
    "body": {
    "autoSubscribeNewMembers": true
    }
    }
    ]
    }

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    Are you using the GroupID that is the group GUID? (You probably don't need the "id":1 in the request.)

    https://learn.microsoft.com/en-us/graph/api/group-get?view=graph-rest-1.0&tabs=http

     

    Here it shows that to update a group setting then you have to use 

    https://learn.microsoft.com/en-us/graph/api/groupsetting-update?view=graph-rest-1.0&tabs=http 

     

    PATCH https://graph.microsoft.com/v1.0/groups/0167b5af-f3d1-4910-82d2-398747fa381c/settings/fa6df613-159b-4f94-add2-7093f961900b

     

    so that is "groups/{groupId-GUID}/settings/{settings-GUID}

     

    could you get the setting Id and include that in your url request?

  • REENASH Profile Picture
    89 on at

    @wskinnermctc ,
    I don't have any group setting created, Do I need to create it first?

     

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    No the group settings most likely already exist. You need to run an HTTP request in MS Graph explorer or power automate and get the settings Id

     

    This link shows more about getting groupsettings

    https://learn.microsoft.com/en-us/graph/api/group-list-settings?view=graph-rest-1.0&tabs=http

     

  • REENASH Profile Picture
    89 on at

    @wskinnermctc 

    GroupSetting is blank.  I need to patch "autoSubscribeNewMembers": true to the group.
    If I run create and update group api one after the another, it failed and give error "InvalidgroupId". But I'll run the create and update group separately, it works fine.

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    Ok was a little confused between what is a groupsetting and what is a property of the group.

     

    This shows that autoSubscribeNewMembers is a property of the group.

    https://learn.microsoft.com/en-us/graph/api/group-update?view=graph-rest-1.0&tabs=http 

     

    What is the "id":1 for in the JSON? Is that supposed to be the group ID? I don't see anywhere MS Graph is referencing the "id": as a number, only as a GUID.

     

    Can you try deleting that "id":1 from the json? The GUID in the url should be all that is needed to refer to the correct group.

     

     

  • REENASH Profile Picture
    89 on at

    The issue is not with batch query or update group query. Once group created and if we try to update the group settings like autosubscribenewmember,autoSubscribeNewMembers and some more by passing group id from output of create group wont work. Because it might return you the group id but wont be created in azure in full functional. So to overcome this, I'm updating such properties in Delay until loop where it work after 30 to 5 seconds.

     

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