We're implementing web application that get access to user's microsoft mailbox and sends the email. We're using Microsoft Graph SDK MSAL.NET library.
We revoke application this way:
var app = ConfidentialClientApplicationBuilder
.Create(_settings.ClientId)
.WithClientSecret(_settings.ClientSecret)
.WithRedirectUri(_settings.RedirectUrl)
.Build();
var accounts = await app.GetAccountsAsync().ConfigureAwait(false);
await app.RemoveAsync(accounts.SingleOrDefault()).ConfigureAwait(false);
But it only removes token from data storage, and doesn't actually revokes the permissions, so the app remains in the list of the application in the Microsoft Account.
Is it possible to configure the code the way that when user revokes the token in web application the code sends the request to some Microsoft endpoint and removes the app from Microsoft account ?
Thanks, Evgeny.