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

Remove unusable tenants #9921

Merged
merged 1 commit into from
Apr 9, 2020
Merged

Conversation

aaomidi
Copy link
Contributor

@aaomidi aaomidi commented Apr 9, 2020

This PR fixes #9885

So it seems like some users have access to tenants that they can't do resource management on. Keeping these tenants in the account seems silly as no operation will work on them.

Let's log and remove these tenants from the user profile in ADS. If they ever do get access to these accounts back, a simple restart of ADS will repopulate these and try again.

@aaomidi aaomidi requested a review from Charles-Gagnon April 9, 2020 19:28
console.log(ex);
account.isStale = true;
return undefined;
console.log(`Could not refresh access token for ${JSON.stringify(tenant)} - silently removing the tenant from the user's account.`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about other general errors that occur while trying to refresh? Is the error not something we can check for more specifically?

It might be worth thinking about asking the user whether they want us to remove the tenant so that at least they're aware it's happening. (I'm a little worried most users won't know what that means though so not sure what the best approach is here)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Synced offline

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked offline - going to get this in and then if users have an issue with missing resources can look into exposing this more publically to them. But it should be enough of an edge case that this is fine to just do and log in the console.

console.log(ex);
account.isStale = true;
return undefined;
console.log(`Could not refresh access token for ${JSON.stringify(tenant)} - silently removing the tenant from the user's account.`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked offline - going to get this in and then if users have an issue with missing resources can look into exposing this more publically to them. But it should be enough of an edge case that this is fine to just do and log in the console.

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

Successfully merging this pull request may close these issues.

Azure Account adding not working
2 participants