graph url scopes not supported for smtp and imap

Copper Contributor

For authentication, we are using below scopes as mentioned in the doc
https://docs.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-i...

offline_access
https://outlook.office.com/IMAP.AccessAsUser.All
https://outlook.office.com/SMTP.Send

We are able to get access_token and refresh_token successfully
We want get userPrincipalName using graph api https://graph.microsoft.com/v1.0/me
however we are getting error , looks like for hitting graph api only graph scopes would work.

We tried with graph scopes urls,

https://graph.microsoft.com/IMAP.AccessAsUser.All , https://graph.microsoft.com/SMTP.Send 

and able to hit graph api , however smtp and imap authentication is not working with these scopes.

since Microsoft is deprecating outlook rest apis and asking to move to graph api
then why graph scopes urls are not supported for SMTP and IMAP ?

0 Replies