Skip to content

spo propertybag get

Gets the value of the specified property from the property bag

Usage

spo propertybag get [options]

Options

Option Description
--help output usage information
-u, --webUrl <webUrl> The URL of the site from which the property bag value should be retrieved
-k, --key <key> Key of the property for which the value should be retrieved. Case-sensitive
-f, --folder [folder] Site-relative URL of the folder from which to retrieve property bag value. Case-sensitive
-o, --output [output] Output type. json|text. Default text
--verbose Runs command with verbose logging
--debug Runs command with debug logging

Important

Before using this command, log in to a SharePoint Online site, using the spo login command.

Remarks

To retrieve property bag value, you have to first log in to a SharePoint Online site using the spo login command, eg. spo login https://contoso.sharepoint.com.

Examples

Returns the value of the key1 property from the property bag located in site https://contoso.sharepoint.com/sites/test

spo propertybag get --webUrl https://contoso.sharepoint.com/sites/test --key key1

Returns the value of the key1 property from the property bag located in site root folder https://contoso.sharepoint.com/sites/test

spo propertybag get --webUrl https://contoso.sharepoint.com/sites/test --key key1 --folder /

Returns the value of the key1 property from the property bag located in site document library https://contoso.sharepoint.com/sites/test

spo propertybag get --webUrl https://contoso.sharepoint.com/sites/test --key key1 --folder '/Shared Documents'

Returns the value of the key1 property from the property bag located in folder in site document library https://contoso.sharepoint.com/sites/test

spo propertybag get --webUrl https://contoso.sharepoint.com/sites/test --key key1 --folder '/Shared Documents/MyFolder'

Returns the value of the key1 property from the property bag located in site list https://contoso.sharepoint.com/sites/test

spo propertybag get --webUrl https://contoso.sharepoint.com/sites/test --key key1 --folder /Lists/MyList