-
Notifications
You must be signed in to change notification settings - Fork 202
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
Feature Request: Removing app tokens #640
Comments
@rayluo @bgavrilMS if the app tokens are purged and the user tokens are not, does it have any implications on the end-user experience? We probably should spec this out. |
I believe app tokens and user tokens are independent with each other. This was also called out in the 3rd bullet point in this issue's description. BTW, there was another github issue came in yesterday, which was actually the same topic. I was proposing a different function name |
@localden - to remove user tokens, the pattern is var app = PublicClient or ConfidentialClient;
var accounts = await app.GetAccounts();
foreach (var acc in accounts)
app.Remove(acc); So the API is very much focused on the concept of "Account" which is a materialization of a user in a tenant. If you fetch app tokens, To me it makes sense to not try to use the user token removal pattern for service principals, but would like to know your opinion. |
Makes sense to keep the user and app token patterns somewhat separate. If we treat "Account" as materialization of users and tenants, what is the same alternative for apps? |
I think that "alternative" has long been implicitly established by its acquisition method's naming, |
Problem description: Historically, there is no api in MSAL to remove tokens obtained from
AcquireTokenForClient()
. Therefore, there is no way for an app to "log out" a service principal.Proposal: MSALs add a new API
ConfidentialClientApplication.RemoveAppTokens()
ConfidentialClientApplication.remove_tokens_for_client()
.scope
parameter, because our intention is to purge all app tokens for the current app, regardless of their scopes.The text was updated successfully, but these errors were encountered: