Setting up CDN on Sharepoint Online for use with Framework development

Iron Contributor

there is currently rather conflicting training advice for new SPFx developers. Can anyone confirm what is the correct guidance for this setup please? I have found these two completely different guidance docs.


in "General availability of Office 365 CDN" Vesa Juvonen - Published April 21, 2017
this proposes the command set

Set-SPOTenantCdnEnabled -CdnType Public
Add-SPOTenantCdnOrigin -CdnType Public -OriginUrl /sites/site/library
Get-SPOTenantCdnOrigins -CdnType Public
resulting in<tenant host name>/sites/site/library


then in the latest promoted developer training video
Deploying SharePoint Framework components to production - Deploying to SharePoint CDN

this proposes a different command set (earlier?)
Set-SPOTenant -PublicCdnEnabled $true
New-SPOPublicCdnOrigin Url: https://<tenant host name>/sites/site/library
resulting in<tenant host name>/1544004027c884490c55638fcb53de1f5d4897c5ea7513c1c0849dd7d8f4314cbda99429


both command sets appear to run in the latest Sharepoint Online Command shell


thanks all

2 Replies
Hi Kath,

they did change how it was done, I have recently followed this article and works perfectly for me:

you are quite right, I have tried both methods now and the one that works is


Connect-SPOService -Url https://<my tenant admin>

Get-SPOTenantCdnEnabled -CdnType Public

Add-SPOTenantCdnOrigin -CdnType Public -OriginUrl sites/spfxdev/devcdn


the CDN base path is then



please team could someone pull the old guidance?