You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
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();
}
The text was updated successfully, but these errors were encountered:
Hi Paul,
Thanks for the reply. After Setting up access using our own Entra ID App for App Only Access, can we use pnp framework in C# and perform force checkout on master page gallery?
I have created the new app registration in Azure and set it up for App Only Access and using the following powershell script to check out the master page gallery.
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.
Error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Appreciate, if someone could share why we are getting this error and what has changed recently in SharePoint?
The text was updated successfully, but these errors were encountered: