I am able to obtain the access token but authentication to exchange is always un-successful. Due to the nature of this grant (client grant), the scope used is https://graph.microsoft.com/.default. However, in the application api permissions on azure portal, I have added SMTP.Send.
I'd appreciate if someone can help me whether the confidential client application can be used in this manner. I've also tried public client application with device flow, but the result is still the same.