Hi guys,
I am building my app to allow some users to access some of their data from outlook following this flow https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow
I want to let the users choose which scope he wants to let my app be authorized
For example, he may just wanna choose Mail + Contacts in that case scope would be ['Mail.Read', 'Contacts.Read']
I can add calendar scope after if the user wants, in that case I can send either ['Calendars.Read', 'Mail.Read', 'Contacts.Read'] or ['Calendars.Read']. For the last one, the microsoft api is able to remember the scope already authorized, thats why it works.
My issue comes if the user wants to remove a specific scope but still keep the others. In that case, I didnt find any solutions to perform it.
My original idea is just to send the scopes I want, but as I said previously, microsoft api always remember the previous scope. So it can only add but never revoke.
The google api let you the choice to either include granted scopes or not when dealing with scopes. (doc https://developers.google.com/identity/protocols/oauth2/web-server - include_granted_scopes)
Thanks in advance for your reply,
Alex