You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a dedicate appId registration for mooncake #802
As a continuation of #425, we should consider adding a special appId registration for mooncake since globally registered apps don't replicate to China cloud. This effort will build upon the existing model used by GE - microsoftgraph/microsoft-graph-explorer-v4#955.
The current workaround is registering your own appId in mooncake and using it with Connect-MgGraph - Connect-MgGraph -ClientId $appId -Environment China. AB#10522
hello Icy (@Icybiubiubiu) , i saw that you regesiterd you own app, and it works, how did you do that? i tried both Self-signed certificate and CA certificate,no luck for me.
Activity
leapyear1969 commentedon Jan 24, 2022
hello there, may i know if there's any updates on this issue? my org in China has encountered this problem.
the workaround seems not working, with below error:
AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: '$appId'.However, i tried to use below commands, another error occured:
maisarissi commentedon Jan 28, 2022
Hi leapyear1969 (@leapyear1969) .
Cloud you please call the command with -Debug and share the output?
Icybiubiubiu commentedon Jan 29, 2022
Does this mean self-signed cert cannot be used here?
leapyear1969 commentedon Jan 29, 2022
hello Maísa Rissi (@maisarissi)
please check the error message:

leapyear1969 commentedon Jan 29, 2022
hello Icy (@Icybiubiubiu) , i saw that you regesiterd you own app, and it works, how did you do that? i tried both Self-signed certificate and CA certificate,no luck for me.
georgend commentedon Jan 31, 2022
Icy (@Icybiubiubiu) Is the certificate installed in your machine?
Can you execute with the certificate in memory:-
Icybiubiubiu commentedon Feb 9, 2022
George (@georgend)
Thanks for reminder.
issue was resolved by installing cert on the client.
leapyear1969 commentedon Feb 9, 2022
i still cannot connect to MSGraph via powershell SDK, even i installed the cert on my PC as trusted cert.
georgend commentedon Feb 9, 2022
leapyear1969 (@leapyear1969) have you uploaded the certificate to your mooncake (Azure Active Directory App Registration)?
leapyear1969 commentedon Feb 10, 2022
George (@georgend) yes,i did upload it to the AAD app registartion.

peombwa commentedon May 10, 2022
leapyear1969 (@leapyear1969), the certificate needs to be installed in your user's trusted store on the machine you are running the script from. You can use
Get-ChildItem Cert:\CurrentUser\My\$CertThumbprintto verify if the certificate is indeed installed in the user store. See https://docs.microsoft.com/en-us/powershell/microsoftgraph/app-only?context=graph%2Fapi%2F1.0&view=graph-powershell-beta&tabs=azure-portal#certificate for more details.Alternatively, you can
-Certificateexample shown in https://github.com/microsoftgraph/msgraph-sdk-powershell#usage.I'm able to use app-only with a certificate thumbprint in China cloud without any issue.
leapyear1969 commentedon May 11, 2022
Thanks so much Peter, it works for me after adding the cert to my local machine, i can check it via below command:
Marcoevich commentedon Jul 3, 2025
Hi Gents,
It's been a while since this issue got any attention. Are there still plans to integrate this into 21Vianet tenants?