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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to multiple tenants #6

Closed
MBstatsara opened this issue Oct 27, 2022 · 5 comments
Closed

Cannot connect to multiple tenants #6

MBstatsara opened this issue Oct 27, 2022 · 5 comments
Labels
bug This issue or pull request addresses broken functionality enhancement This issue or pull request will add new or improve existing functionality public-reported This issue is reported by the public users of the tool.

Comments

@MBstatsara
Copy link

馃悰 Summary

We have ran this on our test tenant, and then against a dev environment.
When we get the report from the dev environment it is listing users and settings from the test setup.
Even after a reboot, and deleting the scuba folder and running again from a new location.

To reproduce

Steps to reproduce the behavior:

  1. Run Scuba against tenant 1
  2. Run Scuba against tenant 2
  3. Review reports and you will see details from tenant 1 in tenant 2.

Expected behavior

Would have expected a sign in to occur for each tenant. - which seemed to occur
This reports data from tenant 1 only.
Tenant 2 is then requested a powershell app to setup, and then reports data from tenant 2 only.
See issues for getting the initial domain.

Any helpful log output or screenshots

image

@MBstatsara
Copy link
Author

This seems to be saving some tokens/secrets in the user profile who ran it, If you use a new profile (have to run the setup first) you can then run another test on another tenant, i think ill try and use temp users for the time being, but we shouldnt be storing the first creds/tokens in the users areas

@ethanb-cisa ethanb-cisa added bug This issue or pull request addresses broken functionality enhancement This issue or pull request will add new or improve existing functionality labels Oct 31, 2022
@stugster
Copy link

stugster commented Nov 2, 2022

We are seeing this bug too, with the same process. Tested on our own tenancy and it worked perfectly. Tested on a client tenancy after this and go the same error.

The solution for us was to run:
Disconnect-MgGraph
in powershell prior to running .\RunSCuBA.ps1 to disconnect the Graph connector and re-prompt for Consent.

@ethanb-cisa
Copy link
Contributor

Thanks for the feedback. We're investigating better authentication handling, especially for users with multiple tenants, for future releases.

I'd recommend running Disconnect-MgGraph and then opening a new PowerShell window if you want to run against a different tenant.

@jonathanbourke
Copy link

We are seeing this bug too, with the same process. Tested on our own tenancy and it worked perfectly. Tested on a client tenancy after this and go the same error.

The solution for us was to run: Disconnect-MgGraph in powershell prior to running .\RunSCuBA.ps1 to disconnect the Graph connector and re-prompt for Consent.

Yep, that worked for me. Many thanks.

@ethanb-cisa
Copy link
Contributor

Closed in #24. The Disconnect-SCuBATenant and -DisconnectOnExit should improve this use case. Use either to fully disconnect your current session from any existing tenants.

We are exploring how to improve multi-tenant handling going forward, too. There are some limitations in the different MS modules.

@ethanb-cisa ethanb-cisa added the public-reported This issue is reported by the public users of the tool. label Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue or pull request addresses broken functionality enhancement This issue or pull request will add new or improve existing functionality public-reported This issue is reported by the public users of the tool.
Projects
None yet
Development

No branches or pull requests

4 participants