File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -120,8 +120,12 @@ protected override void ProcessRecord()
120
120
121
121
WriteVerbose ( "Making call to SharePoint Online using the Client Side Object Model (CSOM)" ) ;
122
122
123
- // Validate the permissions in the access token for SharePoint Online
124
- TokenHandler . EnsureRequiredPermissionsAvailableInAccessTokenAudience ( this , AccessToken ) ;
123
+ // Client Credentials based connections do not have an access token, so we can't validate permissions
124
+ if ( Connection . ConnectionMethod != ConnectionMethod . Credentials )
125
+ {
126
+ // Validate the permissions in the access token for SharePoint Online
127
+ TokenHandler . EnsureRequiredPermissionsAvailableInAccessTokenAudience ( this , AccessToken ) ;
128
+ }
125
129
126
130
base . ProcessRecord ( ) ;
127
131
}
You can’t perform that action at this time.
0 commit comments