SharePoint Online Tenant Properties

Note

Tenant Propeties capability is currently in preview in First Release and is subject to change. They are currently not supported for use in production environments.

Tenant Properties allow tenant administrators to add properties in the app catalog that can be read by various SharePoint Framework components. The Tenant Properties are managed by tenant administrators using the Microsoft SharePoint Online Management Shell which is a PowerShell module to manage your SharePoint Online subscription in the Office 365.

Manage tenant properties

Using the Microsoft SharePoint Online Management Shell, tenant administrators can add and remove tenant properties using PowerShell.

Download the Microsoft SharePoint Online Management Shell here

The following PowerShell cmdlets are available to manage the tenant properties:

Since tenant properties are stored in the tenant app catalog, you will need to provide the tenant app catalog site collection URL in the cmdlets below.

Get-SPOStorageEntity

Applies to: Office 365, SharePoint Online

Syntax Get-SPOStorageEntity [-Site] [-Key]

Set-SPOStorageEntity

Applies to: Office 365, SharePoint Online

Syntax Set-SPOStorageEntity [-Site] [-Key] [-Value] [-Description] [-Comments]

Remove-SPOStorageEntity

Applies to: Office 365, SharePoint Online

Syntax Remove-SPOStorageEntity [-Site] [-Key]

Reading tenant properties

Developers can read tenant properties using the SharePoint REST APIs and use them in SharePoint Framework components such as web parts and extensions.

HTTP request

Get a tenant property

GET _api/web/GetStorageEntity('key')

Example

GET _api/web/GetStorageEntity('AnalyticsKey')

Request body

Do not supply a request body for this method.

Response

This returns the storage entity information for the given key.

HTTP/1.1 200 OK
Content-Type: application/json
{
    "Comment":"Tenant property comment.",
    "Description":"Tenant property description",
    "Value":"Tenant property key value"
}