cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FredCamoai
Level: Powered On

Create SharePoint group with a specific owner

Hello,

 

When I create a group by specifying the OwnerTitle, it is not taken into account. I do not understand why. Would you have a solution please?

 

My JSON : 

{
    "inputs": {
        "host": {
            "connection": {
                "name": "@parameters('$connections')['shared_sharepointonline_2']['connectionId']"
            }
        },
        "method": "post",
        "body": {
            "method": "POST",
            "uri": "_api/web/sitegroups",
            "headers": {
                "accept": "application/json;odata=verbose",
                "content-type": "application/json;odata=verbose"
            },
            "body": "{ '__metadata': { 'type': 'SP.Group' }, 'Title': '@{variables('grCollab')}', 'OwnerTitle': '@{body('Mettre_à_jour_l''élément')?['Responsable_x0020_client']?['Claims']}'}"
        },
        "path": "/datasets/@{encodeURIComponent(encodeURIComponent(variables('SiteUrl')))}/httprequest",
        "authentication": "@parameters('$authentication')"
    },
    "metadata": {
        "flowSystemMetadata": {
            "swaggerOperationId": "HttpRequest"
        }
    }
}

The body : 

 '__metadata': { 'type': 'SP.Group' }, 'Title': 'Test Collabs 3 - Collaborateurs', 'OwnerTitle': 'i:0#.f|membership|testdv@xxxxxxxxxxxxxxx.xxx'}

The output : 

{
  "d": {
    "__metadata": {
      "id": "https://xxxxxxxxxxx.sharepoint.com/sites/Projects/_api/Web/SiteGroups/GetById(67)",
      "uri": "https://xxxxxxxxxxx.sharepoint.com/sites/Projects/_api/Web/SiteGroups/GetById(67)",
      "type": "SP.Group"
    },
    "Owner": {
      "__deferred": {
        "uri": "https://xxxxxxxxxxx.sharepoint.com/sites/Projects/_api/Web/SiteGroups/GetById(67)/Owner"
      }
    },
    "Users": {
      "__deferred": {
        "uri": "https://xxxxxxxxxxx.sharepoint.com/sites/Projects/_api/Web/SiteGroups/GetById(67)/Users"
      }
    },
    "Id": 67,
    "IsHiddenInUI": false,
    "LoginName": "Test FDE Collabs 3 - Collaborateurs",
    "Title": "Test FDE Collabs 3 - Collaborateurs",
    "PrincipalType": 8,
    "AllowMembersEditMembership": false,
    "AllowRequestToJoinLeave": false,
    "AutoAcceptRequestToJoinLeave": false,
    "Description": null,
    "OnlyAllowMembersViewMembership": true,
    "OwnerTitle": "TATA",
    "RequestToJoinLeaveEmailSetting": null
  }
}

Thanks for your help and sorry for my english 😉

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Create SharePoint group with a specific owner

HI @FredCamoai ,

 

It seems that you would like to create a SharePoint group with a specific owner.

 

I have seen the following threads for your reference:

https://social.technet.microsoft.com/Forums/en-US/2dcf6e49-cff8-403b-b52e-04d240bef16d/set-group-own...

https://sharepoint.stackexchange.com/questions/198710/changing-the-owner-of-a-group-via-rest-api

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Create SharePoint group with a specific owner

HI @FredCamoai ,

 

It seems that you would like to create a SharePoint group with a specific owner.

 

I have seen the following threads for your reference:

https://social.technet.microsoft.com/Forums/en-US/2dcf6e49-cff8-403b-b52e-04d240bef16d/set-group-own...

https://sharepoint.stackexchange.com/questions/198710/changing-the-owner-of-a-group-via-rest-api

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,723)