I'm using the SharePoint HTTP request /_api/spsitemanager/create to create a new SharePoint site and it works fine if I use the "Owner" attribute as user@domain.com in the Body of the request. I would now like to specify an AAD Security Group as the owner of the site during it's creation. Is that possible?
Managed to get this working by adding another step where I send a POST request to _api/web/SiteGroups(3)/Users with the ID of the AD group
@Nived_Nambiar , getting this error when I try using the above:
The property '__metadata' does not exist on type 'Microsoft.SharePoint.Portal.SPSiteCreationRequest'. Make sure to only use property names that are defined by the type.
Hi @randomsky
Did you add body in HTTP request like below
{ "request": { "__metadata": { "type": "SP.SPSiteCreationRequest" }, "Title": "New Site", "Url": "https://contoso.sharepoint.com/sites/NewSite", "Description": "This is a new site", "SiteDesignId": "6142d2a0-63a5-4ba0-aede-d9fefca2c767", "WebTemplate": "STS#3", "TimeZoneId": 4, "OwnerIdentifier": "object-id-of-security-group" } }
Add the object id in OwnerIdentifier field
Hope this helps 🙂
@Nived_Nambiar , since this is a security group it doesn't have an associated email address. I tried using the AAD object ID of that security grou but it doesn't seem to work with that.
Hi @randomsky
I think that is possible. Specify group's email id there in owner field, hope that would works
Mark it as solution if it resolves your query 🙂
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2