CSOM tenant API support on-premise

A while ago I tried out the CSOM tenant API on-premise with SharePoint 2013. I then thought that I wasn’t able to get it working.

Then “Vesku” published a new blog on this matter:


It appears that only a limited set of the tenant CSOM API is supported on-premise. For example, I tried to read the app catalog, but that does not work.

He writes:
All other methods of the Tenant object are not supported and will cause for exceptions due dependencies on site subscription, which typically does not exist in the on-premises deployment.
Therefore, this fragment does not work:
# http://zimmergren.net/technical/office-365-dev-tip-getting-all-apps-from-your-tenant-app-catalog-using-the-office-365-csom-api
$coll = $tenant.GetAppInfoByName([string]::Empty)

Resulting in the exception:
Exception calling "ExecuteQuery" with "0" argument(s): "The method GetAppInfoByName does not exist."

But, this does work:
$site = $tenant.GetSiteByUrl($siteUrl)

Bottom-line I managed to get the maximal achievable result on-premise after all..
Is there a DSC script available to activate the tenant API? ;)


Populaire posts van deze blog

Exploring advanced DOM interop with Blazor WebAssembly

Azure Custom Role Definitions and Assignment Scopes

Troubleshooting restoring a site collection