When attempting to login to a GCC High Tenant I receive the following error.
Message: AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application
I've seen threads regarding other tenants. Wondering if there is anything I need to do differently or if this is a handshake change required on your side.
Thanks,
Dakota
CLI for Microsoft 365 v3.2.0
Windows 10
GCC High
Thanks for reporting @DakotaWray2. I suspect this is caused by us defaulting to login.microsoftonline.com instead of login.microsoftonline.us which we should use for GCC High. I don't know if this is the only difference between the two clouds, but it's definitely something that we could begin with. This would require a change on our end.
Looking at it further, this could require deeper changes related to how we obtain tokens for the different resources: https://github.com/Azure/azure-cli/blob/4e1ff0ec626ea46d74793ad92a1b5eddc2b6e45b/src/azure-cli-core/azure/cli/core/cloud.py#L364
Adding https://docs.microsoft.com/en-us/azure/azure-government/documentation-government-get-started-connect-with-cli as a related resource
Thanks for the quick follow up @waldekmastykarz. Happy to test it for you.
Awesome! Let's see if we can get this moving 馃挭
All right, I have a first draft ready for you to test.
Setup instructions:
npm un @pnp/cli-microsoft365 -gnpm inpm run buildnpm linkm365 login --cloud AzureUSGovernment (here you will likely need to use your own AAD app, because the default one is not supported in GCC High)m365 todo list list, m365 spo site list, m365 flow environment listnpm unlinknpm i -g @pnp/cli-microsoft365)Looking forward to hear if this version works and if there is anything that we'd need to adjust.
I'm getting an error during build. FWIW im on node 10.16.3 and npm 6.9.0 via nvm-windows
../../../node_modules/@types/request-promise/index.d.ts:26:49 - error TS2694: Namespace 'request' has no exported member 'Response'.
Edit -- installed @types/request-promise and all is well with the build.
Hi @waldekmastykarz thanks again for knocking this out. Reporting back that I can successfully hit my GCC High Tenant. Without registering an app in AAD I noted the following (not a conclusive list).
I'll set up an AAD registration for this soon and see if any of the above changes.
Thank you for checking out the build! It seems like we've got some things working so we're on a good track!
Re the issue to build the solution on Windows. Let's have a look at it. Other contributors haven't reported it, but perhaps I've introduced a regression in this branch. Let's double check it.
Re connection issues: I'd love to hear more what's wrong and what does it after you created a registration. Any information about the failed commands and requests you could provide us with would be invaluable. You can get more info by running commands with the --debug switch, but since the requests contain access token and full URLs, you'll need to be careful what you share. What would help is to know if we correctly rewrite domains for GCC High and if the retrieved access tokens are for the right audience (which you can best validate yourself using jwt.ms or jwt.io).
Once again, thanks for your help and looking forward to getting more information. Please, don't hesitate to reach out if we can help with anything.
Hey @DakotaWray2, did you have a chance to look some more into it?
Hi again @waldekmastykarz, I haven't yet had a chance but I will try to soon!
Hey @DakotaWray2, did you have a chance to test if we correctly support GCC High?
Most helpful comment
All right, I have a first draft ready for you to test.
Setup instructions:
npm un @pnp/cli-microsoft365 -gnpm inpm run buildnpm linkm365 login --cloud AzureUSGovernment(here you will likely need to use your own AAD app, because the default one is not supported in GCC High)m365 todo list list,m365 spo site list,m365 flow environment listnpm unlinknpm i -g @pnp/cli-microsoft365)Looking forward to hear if this version works and if there is anything that we'd need to adjust.