Replies: 2 comments
-
First off, have you disabled the "DisabledCustomAppAuthentication" property on your tenant? I think this may impact client secret enterprise apps using SPO permissions, as well as SPO app-only permissions (ACS). I'm getting the same experience, even with DisabledCustomAppAuthentication disabled. I've tested with an Azure AD app with Azure AD SPO permissions, an Azure AD app with ACS permissions and an SPO app with ACS permissions. All seem to connect, but any cmdlet I try to run results in the "Exception has been thrown by the target of an invocation." Note that these all work on my commercial developer tenant once I disabled DisabledCustomAppAuthentication, but not in our GCC High tenants. I did open a ticket with Microsoft and their conclusion after 3 months of thinking about it was that nothing is really guaranteed to work in GCC High and it must be PnP Powershell's fault. Based on that response, I'm moving forward with user's testing clientid/clientsecret connections using their tools (SAP/PI, Alteryx, custom code) to see if it really is just a PnP Powershell issue, or something within GCC High's configuration. As for PnP Powershell, our team uses the certificate-based enterprise app and it works beautifully, so if you have that option available to you, go that route. |
Beta Was this translation helpful? Give feedback.
-
The following command worked(with -AzureEnvironment) for us: Connect-PnPOnline -Url $SiteURL -ClientId "" -ClientSecret "" -AzureEnvironment USGovernment |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am getting error when i try to connect to a GCC high sharepoint environment using client id and client secret. Following is the code i am using.
Connect-PnPOnline -Url $SiteURL -ClientId "" -ClientSecret ""
New-PnPList -Title "Demo List" -Template GenericList
When trying to connect using the above script and perform some activities, we are getting this error.
New-PnPList : Exception has been thrown by the target of an invocation.
Beta Was this translation helpful? Give feedback.
All reactions