Oct 04 2017 02:32 PM - edited Oct 19 2017 03:46 PM
Oct 04 2017 02:32 PM - edited Oct 19 2017 03:46 PM
Hi All,
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.
Tenant Properties is currently in preview and is available to First Release tenants.
Here is the documentation on how to use the SharePoint Online Management Shell to manage properties and use the REST API to read those properties: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/tenant-properties
We would love to hear your feedback! Do post your comments/feedback/suggestions below!
Oct 06 2017 07:45 AM
Oct 11 2017 10:36 AM
Oct 13 2017 05:39 AM - edited Oct 13 2017 05:45 AM
Oct 13 2017 05:39 AM - edited Oct 13 2017 05:45 AM
What will happen if the key already exists and we run the Set-SPOStorageEntity again ? Will it be overwritten or throw error ?
Would be amazing if we could also have something like Update-SPOStorageEntity and Delete-SPOStorageEntity or Remove-SPOStorageEntity as well.
Also, is there any character limit to this ?
Oct 17 2017 01:26 PM
Oct 19 2017 09:14 AM
Oct 19 2017 03:47 PM
Thanks! Not sure what changed but it works now.
Oct 30 2017 06:45 AM
great to see the ever useful old 'property bag' resurface.
be good to see PnP JS Core encapsulate the GET request to make this neater and obviate uneeded code lines. hopefully in next release perhaps?
Nov 09 2017 04:27 AM
just been having a run through with this and the powershell side was sweet, no problem. I have checked that I can retrieve the value.
but am a bit stuck with setting up the right typescript code to read the value back. I don't seem to be getting any data but that may be my code is wrong. Still learning Typescript.
Can anyone help and confirm correct coding for this basic read op? thanks hopefully.
Nov 09 2017 10:53 AM
sorted this out in the end and is all working nicely now. Its worth noticing that no json properties are returned for a key that does not exist. so that needs checking for. I guess there is a neat way to use the @odata.null for this but I don't know how so have gone for a simpler test.
Nov 21 2017 08:12 AM
Hey @kath patterson , have added the support for this endpoint in PnP js. It will be available in the next release which will be available around December.
Do update it when it becomes available.
After that, you can use the below code in your webpart:
pnp.sp.web.getStorageEntity('SPFxTestKey').then(r => {
console.log(r);
});
Nov 21 2017 10:51 AM
that's brilliant @Gautam Sheth. I am a big fan of pnp js as a productivity tool and a way of encapsulating agile code such that it can move forward wthout breaking solutions or requiring any rework.
I will certainly try this out and post feedback. great job and keep going with this excellent toolset.