Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] M365 GCC High Errors Calling Cross-Sovereign Cloud Resource #3852

Open
1 of 6 tasks
aaronnl3h opened this issue Mar 25, 2024 · 6 comments
Open
1 of 6 tasks

[BUG] M365 GCC High Errors Calling Cross-Sovereign Cloud Resource #3852

aaronnl3h opened this issue Mar 25, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@aaronnl3h
Copy link

Reporting an Issue or Missing Feature

The Get-PnPPowerPlatformEnvironment cmdlet seems to be calling out to the commercial endpoint management.azure.com instead of the endpoint appropriate for the environment that was set in the initial Connect-PnPOnline connection. I operate out of a GCC High tenant. I believe the endpoint should be configurable or pointed to "management.usgovcloudapi.net" for a GCC High tenant based on the article here: https://learn.microsoft.com/en-us/azure/azure-government/compare-azure-government-global-azure.

Expected behavior

I expected something other than an error from the Get-PnPPowerPlatformEnvironment cmdlet, once a connection had been set in my GCC High tenant

Actual behavior

image

The error message text states:
Get-PnPPowerPlatformEnvironment: AADSTS650057: Invalid resource. The client has requested access to a resource which is not listed in the requested permissions in the client's application registration. Client app ID: 00000000-fbd8-4d46-93c1-9b23cef00000(PnP PowerShell). Resource value from request: https://management.azure.com. Resource app ID: 797f4846-ba00-4fd7-ba43-dac1f8f63013. List of valid resources from app registration: 00000003-0000-0000-c000-000000000000, 40a69793-8fe6-4db1-9591-dbc5c57b17d8, 00000003-0000-0ff1-ce00-000000000000. Trace ID: Correlation ID: Timestamp: 2024-03-25 21:32:07Z

Steps to reproduce behavior

  1. Initiate connection to GCC High SharePoint Online endpoint, e.g. $ctx = Connect-PnPOnline -Url https://tenant-name.sharepoint.us -Interactive -AzureEnvironment USGovernmentHigh -ClientId 00000000-fbd8-4d46-93c1-9b23cef00000 -MicrosoftGraphEndPoint "graph.microsoft.us" -AzureADLoginEndPoint "https://login.microsoftonline.us" -Tenant "tenant-name.onmicrosoft.com" -ReturnConnection
  2. Sign-in with tenant credentials successfully
  3. Run the following cmdlet: Get-PnPPowerPlatformEnvironment -Connection $ctx
  4. Sign-in again
  5. Error is triggered:
    Get-PnPPowerPlatformEnvironment: AADSTS650057: Invalid resource. The client has requested access to a resource which is not listed in the requested permissions in the client's application registration. Client app ID: 00000000-fbd8-4d46-93c1-9b23cef00000(PnP PowerShell). Resource value from request: https://management.azure.com. Resource app ID: 797f4846-ba00-4fd7-ba43-dac1f8f63013. List of valid resources from app registration: 00000003-0000-0000-c000-000000000000, 40a69793-8fe6-4db1-9591-dbc5c57b17d8, 00000003-0000-0ff1-ce00-000000000000. Trace ID: Correlation ID: Timestamp: 2024-03-25 21:32:07Z

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

PnP PowerShell Cmdlets (2.3.0)

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

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify
@aaronnl3h aaronnl3h added the bug Something isn't working label Mar 25, 2024
@gautamdsheth
Copy link
Collaborator

@aaronnl3h - can you please update to the latest version , 2.4.0 and check ? We made fixes around this area, should help

@aaronnl3h
Copy link
Author

Yes, sir! Will do that and share the results. Thank you!

@aaronnl3h
Copy link
Author

@gautamdsheth - I've updated to the latest version and am seeing the same error message.

image

@aaronnl3h aaronnl3h changed the title [BUG] [BUG] M365 GCC High Errors Calling Cross-Sovereign Cloud Resource Mar 28, 2024
@aaronnl3h
Copy link
Author

I remain interested in support or resolution on this issue. The reason for the behavior and next steps continue to be a mystery.

@aaronnl3h
Copy link
Author

Have I overlooked anything as part of submitting this support request? I remain interested in resolution.

@aaronnl3h
Copy link
Author

Have I overlooked anything as part of submitting this support request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants