Organisation Assets Library REST API

SharePoint Online provides a functionality called ‘Organisational Assets Library’ that based on the documentation allows the organisation to store assets like images or photos in easily accessible place. There is a possibility to configure one or more Document Libraries to play a role of the ‘Organisational Assets Library’. The only restriction is that all the libraries need to exist in the same site.

You can manage your organisational assets libraries using Powershell or CSOM – more information in the docs .

Note: to be able to work with Organisational Assets Libraries, first it’s required to enable Tenant CDN.

REST API

However, recently I had requirement to obtain the information about those from SPFx WebPart, so my first steps where to find out how to get those information with REST calls.

To work with the web service, these endpoints need to be used:

    • /_api/Microsoft.Online.SharePoint.TenantManagement.Office365Tenant/SetOrgAssetsLib
    • /_api/Microsoft.Online.SharePoint.TenantManagement.Office365Tenant/GetOrgAssets
    • /_api/Microsoft.Online.SharePoint.TenantManagement.Office365Tenant/AddToOrgAssetsLibAndCdn
    • /_api/Microsoft.Online.SharePoint.TenantManagement.Office365Tenant/RemoveFromOrgAssets

Based on this information I have created a OrgAssets service class that helps work with the endpoints:


Types used by the service:

Note: it might take couple of seconds to view the changes applied after the execution of the request.

Hope it’s going o be useful for you!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s