0

We had C# code to provision a new site using PnP C# library with XMLTemplateProvider, that used to work from past 6+ years. Recently, we are facing the following error while trying to check out the Master Page Gallery.

Appreciate, if someone could share why we are getting this error and what has changed recently in SharePoint?

using (var repositoryContext = new AuthenticationManager().GetAppOnlyAuthenticatedContext(templatesSiteUrl,clientId,clientSecret))  {
    var mpgallery = web.GetListByTitle("Master Page Gallery");   
    mpgallery.ForceCheckout = true;   
    mpgallery.Update();   
    web.Context.ExecuteQueryRetry();
}

Error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

1 Answer 1

0

Most probably you have stumbled upon ACS retirement.
https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/retirement-announcement-for-azure-acs

Azure ACS will stop working for new tenants as of November 1st, 2024 and it will stop working for existing tenants and will be fully retired as of April 2nd, 2026.

All sites created before April 2nd 2024 could be configured for ACS - after that, ACS cannot be configured anymore (despite admin access to such switch - it was not working as described). That means - previously created and configured sites still worked, but new one did not.

Based on my experience, Microsoft likes to gradually roll out Online features - some parts earlier, some later. So I would not be surprised if some ACS restrictions are already on the way before November.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.