Hi,
I'm trying to implement a Logic App (or Flow) which can send e-mails in the name of the caller (another user). So a user calls a Flow or Logic app we built with an own Flow. So the user is known and his access token could be “transferred”.
When I create an app (App registration) with application permission for the Graph Mail.Send API this works.
With delegated permission I did not succeed to implement it.
Even when getting the OAuth token first for the caller user I only get a NoPermissionsInAccessToken when calling the App to send.mail via Graph API:
"code": "NoPermissionsInAccessToken",
"message": "The token contains no permissions, or permissions can not be understood.",
Found this blog where similar behavior is mentioned and the alternatives are not really possible or good.
https://stackoverflow.com/questions/56495738/retrieve-oauth-2-0-authorization-code-without-user-interaction
Do you have any hint how to implement a generic "Send As" in delegation of a user with Flow or Logic Apps (not using a shared mailbox and give send as permission).
Is application permission really the only way?
Regards,
Stefan