pnp / pnp/pnpframework

CSOM - ApplyProvisioningTemplate - 403 Forbidden Error and Attempted to perform an unauthorized operation exception

Open
#561 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
259
Forks
161
Avg merge
10h 33m
Merged PRs (30d)
1

Description

I'm using PnPFramwork in my project to provision a O365 group enabled team site and then I want to apply a PnP template on top of the site.
when I execute ApplyProvisioningTemplate on web with PnP Template to Create SharePoint List, Navigation links, I'm getting the below error:
The remote server returned an error: (403) Forbidden.
image

when I execute ApplyProvisioningTemplate on web with PnP Template to Client Side Pages with webpart, I'm getting the below exceptions:
Attempted to perform an unauthorized operation.
image

I haven't seen these issues on using SharePointPnPCoreOnline but it occurs with PnPFramework.

Connected the team site using SharePointOnlineCredentials with ServiceAccount and Secure Password.
ServiceAccount have Owner access and Site collection Administrators permission to the site.

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing ApplyProvisioningTemplate with SharePointOnlineCredentials on an O365 group-enabled team site, covering list/navigation provisioning and client-side pages with web parts. Compare the failures with the reported SharePointPnPCoreOnline behavior and verify the service account permissions. Done means the cause of the 403 and unauthorized-operation errors is identified and the affected provisioning scenarios work or are clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.