SP.HubSites.CanCreate
Returns whether the current user can create a hub site. Only tenant admins can create hub sites.
HTTP request
GET /_api/SP.HubSites.CanCreate
URI parameters
None
Request headers
Header | Value |
---|---|
Accept | application/json;odata=verbose |
Content-Type | application/json;odata=verbose;charset=utf-8 |
x-requestdigest | The appropriate digest for current site. |
Request body
Do not supply a request body for this method.
Responses
Name | Type | Description |
---|---|---|
200 OK | SPHubSiteCanCreate | Success |
Examples
Check if you can create hub sites
Sample request
GET
https://contoso.sharepoint.com/sites/marketing/_api/SP.HubSites.CanCreate
Sample response
Status code: 200
{
"@odata.context": "https://contoso.sharepoint.com/sites/marketing/_api/$metadata#Edm.Boolean",
"value": true
}
Definitions
Type | Description |
---|---|
SPHubSiteCanCreate | Indicates if you have permissions to create a hub site. |
SPHubSiteCanCreate
Indicates if you have permissions to create a hub site.
Name | Type | Description |
---|---|---|
value | Boolean | True if you have permissions to create a hub site; otherwise, false. |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for