This topic was automatically generated from Slack. You can find the original thread here.
Chee Sian ng : Hi pipedream community,
I have posted previously with regards on how to generate a new token and I was told that pipedream will handle the token on it’s own, as long as I use the build in graph api authentication module. I tried with some simple graph api’s like the view my profile, to even list my OneDrive structure and it was a success.
However, I am kinda stuck with the sending email portion. I tried to do the same by authenticating myself to pipedream’s built in graph module. After which , I change the api to be
https://graph.microsoft.com/v1.0/me/sendMail
Here’s a list of what I tested. I will not include the codes I used in my workflow yet, just to prevent clogging up this thread.
- Checked if I can send using the graph explorer testing page. - Success
- Checked if I have added the delegated permissions via my azure. Yes, I have added every single possible API related to email read and send and had “grant admin consent for default directory”
- Tried to send with pipedreams default node.js code, but I changed the API to be https://graph.microsoft.com/v1.0/me/sendMail - failed with
“code”: “ErrorAccessDenied”,
“message”: "Access is denied. Check credentials and try again - But if I were to insert the access token with the access token from the graph explorer and replace the Authorization:
Bearer ${auths.microsoft_graph_api.oauth_access_token}
, with the token as a variable, I can send out the email and I received it
5. I know that this access token will expire eventually. Hence, I am wondering, How do I proceed to use pipedream if I wish to use the workflow to send emails using Microsoft Office 365 as a user.
Thanks in advance. Please let me know if you need me to share my code in the workflow to you.