Forum Discussion
alextest
Aug 24, 2020Copper Contributor
Update Site Sharing Capability with Flow > How to use "admin.sp.com/_api/Tenant/Sites/Update"
Hello everyone, As admin, I need to update the https://docs.microsoft.com/en-us/sharepoint/change-external-sharing-site of a SharePoint site using Power Automate. I have not figured out a ...
Matt_majedi
Jun 15, 2021Copper Contributor
In case someone looking for a solution, this is how I manage to solve this:
you need to use admin API, the URL of the admin API is
https://{tenant name}-admin.sharepoint.com/
you will need the site ID of the site that you want to change the sharing setting.
in your power automate add a new 'Send HTTP request to SharePoint'
Site address: https://{tenant name}-admin.sharepoint.com/
Method: Post
Uri: _api/Microsoft.Online.SharePoint.TenantAdministration.Tenant/Sites('{Site ID}')
Headers:
- accept : application/json;odata=verbose
- content-type: application/json;odata=verbose
- X-HTTP-Method: MERGE
Body:
{
"__metadata": {
"type": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties"
},
"SharingCapability": 1
}
Aysani
Oct 08, 2021Copper Contributor
Thank you for sharing! great find!