Aug 24 2020 11:40 AM
Hello everyone,
As admin, I need to update the sharing capability of a SharePoint site using Power Automate.
I have not figured out a way of doing this with Graph API so I am now trying with SharePoint REST API.
Using, "Send an HTTP request to SharePoint", I can read the current setting on https://mytenant-admin.sharepoint.com/_api/Microsoft.Online.SharePoint.TenantAdministration.Tenant/S... but I can't use the Update method with POST.
Does anyone know how to do this?
Thanks !
Oct 19 2020 06:49 AM
@alextest how about PUT or, probably better use PATCH? Please try on non-production first.
Jun 15 2021 03:45 AM
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:
Body:
{
"__metadata": {
"type": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties"
},
"SharingCapability": 1
}
Oct 08 2021 12:45 PM