Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/Commands/Base/PnPSharePointCmdlet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,12 @@ protected override void ProcessRecord()

WriteVerbose("Making call to SharePoint Online using the Client Side Object Model (CSOM)");

// Validate the permissions in the access token for SharePoint Online
TokenHandler.EnsureRequiredPermissionsAvailableInAccessTokenAudience(this, AccessToken);
// Client Credentials based connections do not have an access token, so we can't validate permissions
if(Connection.ConnectionMethod != ConnectionMethod.Credentials)
{
// Validate the permissions in the access token for SharePoint Online
TokenHandler.EnsureRequiredPermissionsAvailableInAccessTokenAudience(this, AccessToken);
}

base.ProcessRecord();
}
Expand Down