-
Notifications
You must be signed in to change notification settings - Fork 254
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
Fix AAD 401 authentication errors against GCC high tenants #1266
Fix AAD 401 authentication errors against GCC high tenants #1266
Conversation
…nd added the M365Environment command line parameter to support changing the endpoint FQDN based on the type of tenant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some minor requests to remove a debug statement and comment fixes. But the functional testing I did showed SG worked as expected. As requested, I ran:
- ScubaGear with just the AAD product against all test tenants (passed)
- ScubaGear using a config file for parameters with AAD as well as other products (passed)
- ScubaGear with all pairings of other products (passed)
- ScubaGear with all products against all test tenants (passed)
- ScubaGear
- Ran workflow unit tests (including those for Initialize-SCuBA) manually using Pester and all passed as expected.
Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>
Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, checked with different tenants and SP.
FYI...the changes made to support.psm1 are in response to a previous PR (#1261) that attempted to fix a problem when initializing SG. Unfortunately, it created a new problem with the functional tests that was only now discovered. The changes in support fix both problems, ensuring that the right module path is used no matter where SG is initialized from. |
One more data point in testing for this PR/branch: aad tests on gccchigh ran fine with this branch (with rc there 401 failure); functional tests also running fine on gcchigh with this branch. |
🗣 Description
This PR fixes the problem when running AAD against GCC high tenants with newer versions of the Graph dependency modules. We started getting 401 Unauthorized errors against GCC high because there was some problem with the token that we traced to Invoke-MgGraphRequest. The fix was to pass the MS graph FQDN prefix when calling that cmdlet and that seems to rectify the issue.
Closes #1265
🧪 Testing
✅ Pre-approval checklist
✅ Pre-merge checklist
PR passed smoke test check.
Feature branch has been rebased against changes from parent branch, as needed
Use
Rebase branch
button below or use this reference to rebase from the command line.Resolved all merge conflicts on branch
Notified merge coordinator that PR is ready for merge via comment mention
✅ Post-merge checklist