Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Access Denied error while checking out Master Page Gallery using pnp C# code #1061

Open
1 task done
vvenkataratnam opened this issue Sep 10, 2024 · 1 comment
Open
1 task done

Comments

@vvenkataratnam
Copy link

Category

  • Error

Describe the error

I am using SharepointPnpCoreOnline library (2.11.1701.1) to provision a new site collection, which was working fine for the past 6+ years and started giving the error

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

recently.

Steps to reproduce

 using (var repositoryContext = new AuthenticationManager().GetAppOnlyAuthenticatedContext(
     templatesSiteUrl,
     clientId,
     clientSecret))  {

  var mpgallery = web.GetListByTitle("Master Page Gallery");   mpgallery.ForceCheckout = true;   mpgallery.Update();   web.Context.ExecuteQueryRetry();

Expected behavior

Supposed to checkout the master page gallery and upload the js/css files

  • Framework: [e.g. .NET Framework v4.8]
  • Browser(s): [e.g. Chrome v79 | Safari v22 | FireFox v31 | Chromium Edge v79]
  • Tooling: Visual Studio 2022

Thanks for your contribution! Sharing is caring.

@jansenbe
Copy link
Contributor

@vvenkataratnam : SharePointPnPCoreOnline library is something we retired a long time ago. PnP Framework is the latest version of this. I'll move your issue over to that repo, but best is to upgrade your app to the latest and verify things still work. Also, looking at your code snippet you're using Azure ACS, something Microsoft is retiring as well, best setup an Azure AD app and use that going forward.

@jansenbe jansenbe transferred this issue from pnp/pnpcore Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants