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

Authentication problems with MgGraph connection to 21Vianet tenant (China) #5502

Open
heizkoerperchen opened this issue Dec 4, 2024 · 0 comments

Comments

@heizkoerperchen
Copy link

Description of the issue

I'm trying to export the Entra configuration of a 21Vianet tenant (China). It seems that the gathering of the cloud environment doesn't work correctly for connecting to MgGraph as I'm always getting an error, that the tenant cannot be found.

Command:
Export-M365DSCConfiguration -Workloads AAD -ApplicationId $ApplicationClientId -TenantId "xxx.partner.onmschina.cn" -CertificateThumbprint $Thumbprint

Export-M365DSCConfiguration -Workloads AAD -ApplicationId $ApplicationClientId -TenantId "xxx.partner.onmschina.cn" -ApplicationSecret $SecureClientSecret

Errormessage:

Connect-MgGraph : ClientCertificateCredential authentication failed: AADSTS90002: Tenant 'xxx.partner.onmschina.cn' not found. Check to make sure you have the correct tenant ID and are signing into the correct cloud. Check with your subscription administrator, this may
happen if there are no active subscriptions for the tenant.

If I try to connect through

Connect-MgGraph -TenantId $TenantId -ClientId $ApplicationClientId -CertificateThumbprint $Thumbprint -Environment China

it works without any problem.

Am I missing any parameter here to get it to work with a 21Vianet tenant?

Microsoft 365 DSC Version

V1.24.1127.1

Which workloads are affected

Azure Active Directory (Entra ID)

The DSC configuration

Verbose logs showing the problem

Environment Information + PowerShell Version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant