Today we have seen an exciting new action added to Microsoft Flow! The action is called Send an HTTP request to SharePoint.
In this post I’m going to have a look at how to get site details out of SharePoint and after that I will look at the more exciting bit of how to create a new sub site. This will open many doors to site request processes in Office 365. Imagine creating a site request list, go through an approval process and create your team site all within no time at all.
Get Site details
Table of Contents
I’m going through this step just to explain the basics.
Once you have found the Send an HTTP request to SharePoint action, all you have to do is supply the details to the REST API endpoints. Details can be found on the Microsoft Docs site.
Ok, so the Uri to be used is simply /_api/web

don’t forget to set the header to Accept=application/json;odata=verbose
Ok, this was easy. When you now look at the run output from your flow you will find ll the details of the site in json format!
Now the more exciting bit.
Create a new sub site
This time we need to use the POST method to call our SharePoint REST API.
the uri now is /_api/web/webinfos/add
Then once again set the headers. In this case you don’t need to use the verbose option. You could use nometadata instead however I have got used to the extra bits needed in the body when using the verbose option.
Accept=application/json;odata=verbose Content-Type=application/json;odata=verbose
and the Body needs to be set to something like this:
{ 'parameters': { '__metadata': { 'type': 'SP.WebInfoCreationInformation' }, 'Url':'testsiteflow2', 'Title':'My Title2', 'Description':'My Description', 'Language':'1033', 'WebTemplate':'STS#0', 'UseUniquePermissions':false } }
The Url in the above json will be the url used within the site give in the Site Address to create a new sub site. So you would most likely use some dynamic content to set this Url.
The template I’ve set to STS#0. This will give you a team site but of course you could select any of the other templates. But imagine creating modern team sites. Yes you can do this by just updating the WebTemplate in the above to STS (without the #0)
Do you still remember creating dictionaries in SharePoint Designer? Just to get this one call done you had to create 4 of those dictionaries. Now we’ve just just plain simple text feeding the site creation process.

Now run your flow and your site will be created!
Success Handling
When you created a new sub site you could set a variable of the type Object to the Body that is returned by the HTTP request action. This will return something like this:
{ "d": { "__metadata": { "id": "https://pieterveenstramvp.sharepoint.com/_api/web/webinfos/add", "uri": "https://pieterveenstramvp.sharepoint.com/_api/web/webinfos/add", "type": "SP.WebInformation" }, "Configuration": 0, "Created": "2018-05-02T16:37:28", "Description": "My Description", "Id": "26cad790-c071-4d82-acba-e443620b87b3", "Language": 1033, "LastItemModifiedDate": "2018-05-02T16:37:51Z", "LastItemUserModifiedDate": "2018-05-02T16:37:51Z", "ServerRelativeUrl": "/testsiteflow3", "Title": "My Title2", "WebTemplate": "STS", "WebTemplateId": 0 } }

Error handling
When things go wrong however you need to handle things to. This starts by setting the run after settings.

Then you will get a BadGateway error returning the following json
{ "error": { "code": 502, "source": "europe-001.azure-apim.net", "clientRequestId": "861c4a53-f91b-4945-ae71-3335403eb634", "message": "BadGateway", "innerError": { "status": 502, "message": "The Web site address \"/testsiteflow3\" is already in use.\r\nclientRequestId: 861c4a53-f91b-4945-ae71-3335403eb634\r\nserviceRequestId: 7b3e639e-70e7-5000-de78-8990577b77ff", "source": "https://pieterveenstramvp.sharepoint.com/_api/web/webinfos/add", "errors": [ "-2147024713", "Microsoft.SharePoint.SPException" ] } } }
Where can I use this?
Just to give you a few ideas. There are of course a lot more.
- You could create project sites as projects are registered in your PMO solution. Or
- you could create a Client site as your new client has been added to CRM.
- Or maybe create a site after a survey in Microsoft Forms has been completed? The options are endless.
Hi Pieter using REST calls within Flow is a game changer ! – No more SharePoint Designer Workflows as you can do almost everything with REST calls ! Hurrah !
Hi Nigel,
That is right! I stopped using SPD for a while now. The only need for SPD is in the on-premises world.
Hi Pieter,
I’m not finding Send an HTTP request to SharePoint action in available actions in Flow, do you know if this is only available for early adopters?
Thanks,
Art
Hi Art,
It only arrived yesterday for me. I do have targeted release switched on. So you might have to wait a few days for this to arrive.
Hier Pieter , did you try to create a modern site? would it be different (given that it is a site collection?
HI Dominique,
I haven’t tried creating site collections yet. It would be different to create a site collection. Traditional sites you can create with the admin service. I guess creating new team sites you could do with the teams connector.
Any luck getting Flows to run on subsites? They don’t show up for me, am assuming subsites aren’t supported.
Hi chad, you mean having a trigger start on item creating within lists in a subsite? It wokrs for me so it should be ok. You might have to add the url of the subsite by adding the url manually rather than selecting it form the drop down.
Hello Pieter
Would you know the what I have to put in so that the top link navigation is inheritance is activated
Thanks
Miles
Hi Miles,
I don’t think that that is possible through the REST API.
Thanks for this, really useful. Is it possible to set permissions on the Subsite and not inherit from the parent?
Hi Mario,
You could do this in a similar way as described here for list items:
https://noellawlor.wordpress.com/2018/01/18/setting-sharepoint-item-list-permissions-with-flow/
Hi All,
I’ve tried the code above in MS Flow several times now, and the flow is FAILING with the following output returned in the HTTP Response:
“status”: 400,
“message”: “The property ‘__metadata’ does not exist on type ‘SP.WebInfoCreationInformation’. Make sure to only use property names that are defined by the type.\r\nclientRequestId: b4e4d5fe-0d1c-425e-bf6d-fb1a525d6c4b\r\nserviceRequestId: 04c9819e-b003-6000-20af-c856f48a57c6”,
“source”: “https://ieaonline.sharepoint.com/sites/testsc/_api/web/webinfos/add”,
“errors”: [
“-1”,
“Microsoft.Data.OData.ODataException”
]
NO ONE else seems to be having this less-than-ideal experience I’m having 🙁
Thoughts?
-Mark in North Aurora IL
HI Mark, When I hit these kind of problem I often go to the REST API url in my browser. Quite often it then shows the fields names etc.
SOLVED recently-reported problem (getting HTTP 404 error):
CAUSE: I neglected to add the “Content-Type” HTTP Request Header variable in my HTTP POST request, that’s all 🙂
WORKING now, and I’m with the others who commented:
– MSFlow is MORE than a replacement for SPD Workflows 🙂
– MSFlow is true SOA-styled SCALABLE, ROBUST workflow for automation 🙂
– MSFlow can be MOBILIZED readily (talk about CODE RE-USE !) 🙂
and
– THIS SendHTTPRequest Action was the codeless tool we’ve been waiting for in MSFlow !
TO PONDER…
The whole philosophy behind MSFlow is that it’s “code-less”; but I find it ironic that in order to fully UNDERSTAND MSFlow… many users often times find themselves UNDERSTANDING “CODING” better than they EVER did (or had to) when doing “pure coding” 😉
All MSFlow really does is effectively “VISUALIZE” or “DIAGRAM-IZE” your coding efforts, as opposed to force you to MENTALLY VISUALIZE your coding.
MSFlow truly MERGES the “textual” and the “visual” aspects of understand program execution, PARTICULARLY in a distributed SOA-based environment where there are truly generalized “clients” consuming “services”.
IF anyone is old enough to remember the 20+ YEARS back to MACROMEDIA, and its DIRECTOR interactive application design environment,, you’ll see how far (or how LITTLE) we’ve actually progressed in more than 2 decades; I guess we simply got distracted by this construct now called “the INTERNET” 😉 …
– Mark
I’m glad you got things resolved. If you need any further help feel free to contact me.
Hi ,
Flow works cool !!!
how to add global navigation Display the same navigation items as the parent site
using JSON code please advice ..
Hi Karthick, I don’t think that the REST API allows you to do this. You could use an Azure function to do this for you. This azure function can then be called from Flow.
Thanks Pieter, Can you please share some References…
I think this post will help you: https://docs.microsoft.com/en-us/azure/azure-functions/functions-twitter-email
Hi Pieter. Is there a way how to use custom site template saved in solutions?
You would need to update the WebTemplate part
‘WebTemplate’:’STS#0′
See the following post for more details:
https://blogs.technet.microsoft.com/fromthefield/2015/10/21/create-a-subsite-web-using-a-custom-template-in-sharepoint-online-using-powershell-and-csom/
Hi Pieter, this URL doesn’t work, have you an alternative URL with the same information?
Hi Dennis, Could you please let me know which url doesn’t work for you?
The site: https://blogs.technet.microsoft.com/fromthefield/2015/10/21/create-a-subsite-web-using-a-custom-template-in-sharepoint-online-using-powershell-and-csom/ doesn’t work, when clicking on the URL I get the message “page not found”. The page has been disabled.
Hi Dennis,
I can’t see that I’m referring to that post.
Hi Pieter,
I found a post from you, above on the 28th of august last year.
Hi Pieter Veenstra,
How to Create Team Site Using Flow i .e https://abc.sharepoint.com/sites/(Team Site Name).
I would probably try to do this with Flow calling Azure Functions. Then you can do the job of site creation using PowerShell
Could you select a Custom site template to be used? If so, how do I find out what the STS numbers are for the custom templates? Or, how are they identified? Thanks!
Update – i found where to update the webtemplate part a few posts up :). With this in mind, say we have 15 different custom templates. Do you think using Flow like this is a practical solution? Trying to find an alternative to Nintex. Thanks!
Hi Steve,
I can’t see a reason why you couldn’t use Flow. Yes you could use Nintex but i don’t see any real benefit in doing so.
Hi Peter, thanks for this article, one issue i am hitting is that you have two choices when you create a subsite and specify ‘UseUniquePermissions’ which can be true or false. If its false it keeps the parent groups in the subsite (ok all good) but i don’t want this so set it to true, the site is then created with no site groups. Whilst i can add my own sharepoint groups with similar rights , Owner-full control, member-edit/contribute, visitor-read this isn’t great as you can’t set them to be the default groups via Flow/ send as http request, so this impacts things like when you share, the sharing dialogue may default to the owners group which is not desired (i.e. if the user doesn’t realise and clicks / expands the more options when sharing a file).. So I kind of want to provision the subsite with an AssociatedMemberGroup, AssociatedOwnerGroup specified via the REST API, using Flow and “send as HTTP actions” I see several posts of people saying the GET method is supported but not the POST method. Any ideas, have you ever hit this?. Trying to do all it all without using Azure / Pnp
I found permissions on lists but on sites I haven’t found yet:
https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/set-custom-permissions-on-a-list-by-using-the-rest-interface
Hi Pieter, great post.
I am not too familiar with SharePoint but was able to follow the post and create a list where a custom template sub-site is created. What I am looking for, perhaps goes into the body section(?) as it seems similar to the other items being notated there, but would you know (or be able to provide a way to figure this out for future instances) what language to use within the ” for the following from manually creating the sub-site to use in the body(?):
Navigation:
Display this site on the Quick Launch of the parent site? (y/n)
Display this site on the top link of the parent site? (y/n)
Navigation Inheritance:
Use the top link bar from the parent site? (y/n)
Is there syntax that would provide an easy true/false for the above?
You might be able to do this with the /_api/web/Navigation/QuickLaunch endpoint.
https://social.technet.microsoft.com/wiki/contents/articles/51453.sharepoint-2013-add-quick-launch-link-to-site-using-rest-api.aspx
Hi Pieter – I’m having trouble finding what details to use for the REST API endpoints. I’m getting an error if I use the uri: /_api/web/webinfos/add. If I type this into my browser, I get an error: “The HTTP method ‘GET’ cannot be used to access the resource ‘Add’. The operation type of the resource is specified as ‘Default’. Please use correct HTTP method to invoke the resource.”
Thank you for any help!
The output of the GET function is:
D7203-UUP2P3S-BYNWP0{
“d”: {
“__metadata”: {
“id”: “https://abccre.sharepoint.com/projects/_api/Web”,
“uri”: “https://abccre.sharepoint.com/projects/_api/Web”,
“type”: “SP.Web”
},
“FirstUniqueAncestorSecurableObject”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/FirstUniqueAncestorSecurableObject”
}
},
“RoleAssignments”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/RoleAssignments”
}
},
“Activities”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/Activities”
}
},
“ActivityLogger”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/ActivityLogger”
}
},
“Alerts”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/Alerts”
}
},
“AllProperties”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/AllProperties”
}
},
“AppTiles”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/AppTiles”
}
},
“AssociatedMemberGroup”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/AssociatedMemberGroup”
}
},
“AssociatedOwnerGroup”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/AssociatedOwnerGroup”
}
},
“AssociatedVisitorGroup”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/AssociatedVisitorGroup”
}
},
“Author”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/Author”
}
},
“AvailableContentTypes”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/AvailableContentTypes”
}
},
“AvailableFields”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/AvailableFields”
}
},
“ClientWebParts”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/ClientWebParts”
}
},
“ContentTypes”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/ContentTypes”
}
},
“CurrentUser”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/CurrentUser”
}
},
“DataLeakagePreventionStatusInfo”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/DataLeakagePreventionStatusInfo”
}
},
“DescriptionResource”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/DescriptionResource”
}
},
“EventReceivers”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/EventReceivers”
}
},
“Features”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/Features”
}
},
“Fields”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/Fields”
}
},
“Folders”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/Folders”
}
},
“HostedApps”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/HostedApps”
}
},
“Lists”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/Lists”
}
},
“ListTemplates”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/ListTemplates”
}
},
“Navigation”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/Navigation”
}
},
“OneDriveSharedItems”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/OneDriveSharedItems”
}
},
“ParentWeb”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/ParentWeb”
}
},
“PushNotificationSubscribers”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/PushNotificationSubscribers”
}
},
“RecycleBin”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/RecycleBin”
}
},
“RegionalSettings”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/RegionalSettings”
}
},
“RoleDefinitions”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/RoleDefinitions”
}
},
“RootFolder”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/RootFolder”
}
},
“SiteCollectionAppCatalog”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/SiteCollectionAppCatalog”
}
},
“SiteGroups”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/SiteGroups”
}
},
“SiteUserInfoList”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/SiteUserInfoList”
}
},
“SiteUsers”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/SiteUsers”
}
},
“TenantAppCatalog”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/TenantAppCatalog”
}
},
“ThemeInfo”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/ThemeInfo”
}
},
“TitleResource”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/TitleResource”
}
},
“UserCustomActions”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/UserCustomActions”
}
},
“Webs”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/Webs”
}
},
“WebInfos”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/WebInfos”
}
},
“WorkflowAssociations”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/WorkflowAssociations”
}
},
“WorkflowTemplates”: {
“__deferred”: {
“uri”: “https://abccre.sharepoint.com/projects/_api/Web/WorkflowTemplates”
}
},
“AllowRssFeeds”: true,
“AlternateCssUrl”: “”,
“AppInstanceId”: “00000000-0000-0000-0000-000000000000”,
“Configuration”: 0,
“Created”: “2013-07-21T13:55:01”,
“CurrentChangeToken”: {
“__metadata”: {
“type”: “SP.ChangeToken”
},
“StringValue”: “1;2;71d3c1b8-2576-411f-a99f-2f93ce62707d;636789455544700000;102247947”
},
“CustomMasterUrl”: “/projects/_catalogs/masterpage/seattle.master”,
“Description”: “ABCO Active Projects”,
“DesignPackageId”: “00000000-0000-0000-0000-000000000000”,
“DocumentLibraryCalloutOfficeWebAppPreviewersDisabled”: false,
“EnableMinimalDownload”: true,
“FooterEnabled”: false,
“HeaderEmphasis”: 0,
“HeaderLayout”: 0,
“HorizontalQuickLaunch”: false,
“Id”: “71d3c1b8-2576-411f-a99f-2f93ce62707d”,
“IsMultilingual”: false,
“Language”: 1033,
“LastItemModifiedDate”: “2018-11-27T19:35:39Z”,
“LastItemUserModifiedDate”: “2018-11-27T19:35:39Z”,
“MasterUrl”: “/projects/_catalogs/masterpage/seattle.master”,
“MegaMenuEnabled”: false,
“NoCrawl”: false,
“ObjectCacheEnabled”: false,
“OverwriteTranslationsOnChange”: false,
“ResourcePath”: {
“__metadata”: {
“type”: “SP.ResourcePath”
},
“DecodedUrl”: “https://abccre.sharepoint.com/projects”
},
“QuickLaunchEnabled”: true,
“RecycleBinEnabled”: true,
“ServerRelativeUrl”: “/projects”,
“SiteLogoUrl”: “/SiteAssets/AB-logo-red-med.gif”,
“SyndicationEnabled”: true,
“Title”: “Projects”,
“TreeViewEnabled”: false,
“UIVersion”: 15,
“UIVersionConfigurationEnabled”: false,
“Url”: “https://abccre.sharepoint.com/projects”,
“WebTemplate”: “STS”,
“WelcomePage”: “SitePages/Home.aspx”
}
}J-3A20040-WE
Hi Shane,
You cannot call a get method in your browser.
If you try to do this within Flow are you able to create a site? If not what are the errors that you are seeing in Flow?
The error message I get is:
“status”: 400,
“message”: “Not well formatted JSON stream.\r\nclientRequestId: e85cfdf3-9b43-4ce2-8a32-e85c6337ea62\r\nserviceRequestId: 7cd5a69e-f066-7000-7263-3b631b30c678”,
“source”: “https://abccre.sharepoint.com/projects/_api/web/webinfos/add”,
“errors”: [
“-1”,
“Microsoft.SharePoint.Client.InvalidClientQueryException”
]
}
Can you send me the body of the post action as well please?
I’m sure its because I’m not using the correct details from the Get function when I ran it – I’m just not sure what details to use in the Post function?
{ ‘parameters’:
{ ‘__metadata’:
{ ‘type’: ‘SP.Web’ },
‘Url’:@{triggerBody()[‘Job_x0020_Number’]},
‘Title’:@{triggerBody()[‘Title’]},
‘Description’:@{triggerBody()[‘Project_x0020_Description’]},
‘Language’:’1033′,
‘WebTemplate’:’Projecttemplate’,
‘UseUniquePermissions’:false
}
}
Thx!
HI Shane,
The WebTemplate needs to be using the Template IDs. Projecttemplate will not work. See https://absolute-sharepoint.com/2013/06/sharepoint-2013-site-template-id-list-for-powershell.html
Also, I wonder if the single quotes were messed up. This can happen with copy past from blogs.
Then finally the type needs to be set to SP.WebInfoCreationInformation
So more like this:
{ ‘parameters’:
{ ‘__metadata’:
{ ‘type’: ‘SP.WebInfoCreationInformation’ },
‘Url’:’testsiteflow2′,
‘Title’:’My Title2′,
‘Description’:’My Description’,
‘Language’:’1033′,
‘WebTemplate’:’STS#0′,
‘UseUniquePermissions’:false
}
}
Hi Pieter,
Thanks for the tips!
Actually I managed to create the subsite with a custom template, but the flow always finish with error “502…url alredy in use etc etc”, is it normal?
Hi,
can you send me more details of the error from the flow run history? You shouldn’t get an error.
SUre,
This is the Body of the HTTP request (POST)
{ ‘parameters’:
{ ‘__metadata’:
{ ‘type’: ‘SP.WebInfoCreationInformation’ },
‘Url’:’site_test’,
‘Title’:’title_test’,
‘Description’:’abc’,
‘Language’:’3082′,
‘WebTemplate’:'{BD893029-F5A1-4009-9F6B-39185C3BFADC}#template_custom_2′,
‘UseUniquePermissions’:false
}
}
————————————
this is the Output message
{
“error”: {
“code”: 502,
“source”: “brazil-001.azure-apim.net”,
“clientRequestId”: “09b13443-9c4b-472d-9968-08df01c3f7fb”,
“message”: “BadGateway”,
“innerError”: {
“status”: 502,
“message”: “The Web site address \”/sites/testsitecollection/site_test\” is already in use.\r\nclientRequestId: 09b13443-9c4b-472d-9968-08df01c3f7fb\r\nserviceRequestId: ef7bbd9e-d0a8-0000-25bc-3210f9a6b940″,
“source”: “https://*******.sharepoint.com/sites/testsitecollection/_api/web/webinfos/add”,
“errors”: [
“-2147024713”,
“Microsoft.SharePoint.SPException”
]
}
}
}
But the flow creates the site, which is weird.
Hi Feibein,
That error is saying that the site already exists. It looks like there are either multiple flows kicking off (and second one is failing with he error) or the site already exists when you attempt to create a new one.
Actually when the flow reach the Post step, there are 4 retries before it fails. Maybe increasing the duration time?
Increasing the duration solved the issue. Thanks!
Hi @Pieter
Is there any possibility to delete a node ?
i would like to delete the default “notebook” node in a TeamsSite because I take care of provisioning this notebook with Graph.
The default node/url for “notebook” has the wired url :
I tryed with POST but the result is the creation of a new node and not an update of the existing node
My code :
/_api/web/Navigation/QuickLaunch
{ ‘__metadata’:
{ ‘type’: ‘SP.NavigationNode’ },
‘IsExternal’: false,
‘Title’: “Notebook”,
‘Url’: “http://portal.office.com”
}
Many thx for your help 🙂
Hi Hadrien,
It all depends a bit on how you provision your site. I often use PnP (PowerShell or Core) to look after my provisioning. The notebook link in the navigation is only a link. At the creation of the site there isn’t a notebook there. Therefore you only need to worry about removing the link form the navigation during the provisioning. Quite often I set my navigation links to clear before the provisioning then recreates all the links.
Thx for your feedback 🙂
In my case the provisioning is done by Flow with MS Graph (cloning Teams)
Is there any workaround to update or clear links with SPO API after the provisioning or it is not possible to clear QuickLaunch from SPO API ?
You could call an Azure Function that cleans things up using PnP PowerShell.
Ok that’s a sad news 🙁 Azure Function = consumption azure and that’s exactly what i would like to avoid.
Thx anyway for your fast answers 😉
Getting below error, while creating a new subsite inside site collection:
{
“error”: {
“code”: 502,
“source”: “flow-apim-msmanaged-na-eastus2-01.azure-apim.net”,
“clientRequestId”: “fe8bfa02-8ddd-4e76-a3a2-68b4cdad057b”,
“message”: “BadGateway”,
“innerError”: {
“message”: “\”sites\todayflow\” contains invalid character ‘\t’.\r\nclientRequestId: fe8bfa02-8ddd-4e76-a3a2-68b4cdad057b\r\nserviceRequestId: a143dc9e-8070-0000-3801-b41459dba6b6″,
“status”: 502,
“source”: “https://abc.sharepoint.com/_api/web/webinfos/add”,
“errors”: [
“-2146232832”,
“Microsoft.SharePoint.SPException”
]
}
}
}
you probably specified sites\todayflow somewhere rather than sites/todayflow
Got same error with that also,
want to create my new site under https://abc.sharepoint.com/sites/…..(new site name)
but it only creates like https://abc.sharepoint.com/(new site name)
How should i put it under , https://abc.sharepoint.com/sites/…..
Ah just realised. You are trying to create a site collection. This only works for sub sites.
Got same error with also,
want to create a new site under https://abc.sharepoint.com/sites/……(new site)
can you send a screen shot of the action in edit mode to contact@veenstra.me.uk
The sites under /sites are site collections not subsites. I had a look at options for creating site collections form Flow.
I would probably go for the creation of an Azure function and PnP PowerShell.
Then call the Azure function from a flow.
Hi, Pieter.
I tried to set “UseUniquePermissions: true’ and was able to create a SharePoint group but will need to assign the new Owners group into the sub-site.
_api/web/sitegroups <- new Owners group
_api/web/sitegroups(Id)/users <- added user to the Owners group
Would it be better to use the BreakRoleInheritance instead? Thanks!
Fred
Hi Fred,
That totally depends on what you want to use as a base for your site security. Break Role Inheritance will use the permissions of the parent site as a default.
How can I associate newly created SharePoint permission groups into the sub-site? What is the REST API call if I use the unique permission? Thanks!
In this post are the REST Api urls given for unique permissions. Do you need them for flow specific?
https://sharepoint.stackexchange.com/questions/222490/spd-2013-workflow-using-rest-api-to-create-site-with-unique-permissions-useuniq
I found this so incredibly helpful! Is it possible to replicate this for Project Library Templates?
Any of the sharepoint templates can be used. Simply replace the sts#0 with the template that you want.
Peter,
The URI you’re looking for is:
_api/web/roleassignments/addroleassignment(Principalid=,roledefid=1073741829)
I’m currently stuck in it producing a null result, however this is as far as I have gotten. The flow does run, perhaps it’s a start?
Hi Kamal, that is one of the many endpoints needed to manage permissions
Hello
I am using same action to create site, I have started seeing below 2 issues:
1. Gateway Timeout
2. Bad gateway
it creates sites but again retries to create site again.
Sometimes does not create site gives error.
Site got created and retries and gives error.
not sure why i am seeing this behavior.
Please help.
Most likely the first attempt to create the site takes too long. Then the retry will fail as the url is already in use. These issues can be tricky to resolve. I would at least disable the retry there.