question

AadityaRane-1988 avatar image
0 Votes"
AadityaRane-1988 asked RaytheonXie-MSFT commented

Is there any way to send rest request to enable SharePoint Public CDN ?

In order to enable Public CDN, there are ways given using "SharePoint PowerShell" and using "m365 cli".

When I looked the request using fiddler in case of "SharePoint PowerShell" and using inbuild debug feature in "m365 cli", I have seen POST request is getting send as follows...

POST https://secloredev-admin.sharepoint.com/_vti_bin/client.svc/ProcessQuery
Content-type: application/xml

<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="CLI for Microsoft 365 v3.13.0" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009">
    <Actions>
        <ObjectPath Id="19" ObjectPathId="18" />
        <Method Name="SetTenantCdnEnabled" Id="20" ObjectPathId="18">
            <Parameters>
                <Parameter Type="Enum">0</Parameter>
                <Parameter Type="Boolean">true</Parameter>
            </Parameters>
        </Method>
        <Method Name="CreateTenantCdnDefaultOrigins" Id="21" ObjectPathId="18">
            <Parameters>    
                <Parameter Type="Enum">0</Parameter>
            </Parameters>
        </Method>
    </Actions>
    <ObjectPaths>
        <Constructor Id="18" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" />
    </ObjectPaths>
</Request>

Is there any documentation or reference available for above format, specially "TypeId".

Or is there, any other way by which I can enable public CDN using user's delegated permissioned "Auth Token" only, without going through all login flow of "PowerShell" or "M365 CLI" ?

sharepoint-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RaytheonXie-MSFT avatar image
0 Votes"
RaytheonXie-MSFT answered RaytheonXie-MSFT commented

Hi @AadityaRane-1988 ,
Per my research, there is no such function to enable CDN with "Auth Token" only. You can refer to the following document to enable CDN.
https://docs.microsoft.com/en-us/sharepoint/dev/spfx/enable-microsoft-365-content-delivery-network?tabs=msposh


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AadityaRane-1988 ,
I am checking to see how things are going there on this issue.

0 Votes 0 ·