Skip to content

[FEATURE] Connect-PnPOnline is not working for national cloud Bleu #5264

@Trista-lover

Description

@Trista-lover

Expected behavior

I want to trigger requests using app-only in new National Cloud environment 'Bleu' which is for France, so I need to create a Entra ID APP and connect it by Connect-PnPOnline, expect it connect successfully.

Actual behavior

It failed to create Entra ID APP in Bleu environment by Register-PnPAzureADApp, and then I manually create it in Azure portal, but I still cannot connect it by Connect-PnPOnline with "Confidential Client is not supported in Cross Cloud request." error.

PS C:\Users\haiyingyang> Register-PnPAzureADApp -ApplicationName "SearchAll Bleu Validation App" -Tenant "a830edad9050849Xamw460sdfh8.onsovcloud.fr" -Store CurrentUser -GraphApplicationPermissions "Sites.Read.All" -SharePointApplicationPermissions "Sites.FullControl.All" -GraphDelegatePermissions "Sites.Read.All", "User.Read" -SharePointDelegatePermissions "AllSites.FullControl" -DeviceLogin
WARNING:
Please login.
We opened a browser and navigated to https://microsoft.com/devicelogin
Enter code: IACP4ZM27 (we copied this code to your clipboard)
NOTICE: close the browser tab after you authenticated successfully to continue the process.
Certificate added to store
Checking if application 'SearchAll Bleu Validation App' does not exist yet...Success. Application 'SearchAll Bleu Validation App' can be registered.
App SearchAll Bleu Validation App with id f78259e7-5b89-4a03-842b-77c842eed3ec created.
Register-PnPAzureADApp: AADSTS900383: Internal error has occurred during a redirect. Please login directly to your National Cloud dedicated portal. Trace ID: 9c4c5ccd-bd7e-4ed9-8f65-ecb02f100900 Correlation ID: 83a358ad-af2f-4d1e-92a5-5f5f36c75590 Timestamp: 2026-03-03 06:27:31Z

PS C:\Users\haiyingyang> Register-PnPAzureADApp -ApplicationName "SearchAll Bleu Validation App" -Tenant "a830edad9050849Xamw460sdfh8.onsovcloud.fr" -Store CurrentUser -GraphApplicationPermissions "Sites.Read.All" -SharePointApplicationPermissions "Sites.FullControl.All" -GraphDelegatePermissions "Sites.Read.All", "User.Read" -SharePointDelegatePermissions "AllSites.FullControl" -AzureEnvironment Bleu
Register-PnPAzureADApp: Cannot bind parameter 'AzureEnvironment'. Cannot convert value "Bleu" to type "PnP.Framework.AzureEnvironment". Error: "Unable to match the identifier name Bleu to a valid enumerator name. Specify one of the following enumerator names and try again:
Production, PPE, China, Germany, USGovernment, USGovernmentHigh, USGovernmentDoD, Custom"

PS C:\Users\haiyingyang> Connect-PnPOnline "https://a830edad9050849xamw460sdfh8.sovcloud-sharepoint.fr/" -ClientId "39fa3973xxx" -Tenant "a830edad9050849Xamw460sdfh8.onsovcloud.fr" -Thumbprint "83D4Axxx"
Connect-PnPOnline: AADSTS900382: Confidential Client is not supported in Cross Cloud request. Trace ID: 18ba48b7-e9c7-48bc-ab54-3fe0b82d0f00 Correlation ID: 653ce51f-134d-4a71-ad01-d8215781c96f Timestamp: 2026-03-03 07:09:00Z

Steps to reproduce behavior

Please include complete script or code samples in-line or linked from gists

What is the version of the Cmdlet module you are running?

(you can retrieve this by executing Get-Module -Name "PnP.PowerShell" -ListAvailable)

PS C:\Users\haiyingyang> Get-Module -Name "PnP.PowerShell" -ListAvailable

    Directory: C:\Users\haiyingyang\OneDrive - Microsoft\Documents\PowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Manifest   3.1.0                 PnP.PowerShell                      Core      {Add-PnPAdaptiveScopeProperty, Add-PnPE…

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions