Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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. |