cancel
Showing results for 
Search instead for 
Did you mean: 

BTP destination configuration to send email using Office 365

Giampaolo
Explorer
0 Kudos

Hi,
I'm trying to send email from a Build Process Automation workflow.

I created sap_process_automation_mail destination as below, but it doesn't work.

Type			MAIL
Proxy Type Internet
Authentication OAuth2Password
User <user_email>
Password <user_pwd>
Client ID <Application ID (client)>
Client Secret <client secret value>
Token Service URL https://login.microsoftonline.com/<Tenant_ID>/oauth2/v2.0/token

- - - ADDITIONAL PROPERTIES - - -
mail.bpm.send.disabled false
mail.smtp.auth true
mail.smtp.auth.mechanisms XOAUTH2
mail.smtp.from <user_email>
mail.smtp.host smtp.office365.com
mail.smtp.port 587
mail.smtp.ssl.checkserveridentity true
mail.smtp.ssl.enable false
mail.smtp.ssl.trust *
mail.smtp.starttls.enable true
mail.smtp.starttls.required true
mail.transport.protocol smtp
scope https://graph.microsoft.com/SMTP.Send

How can i solve?

Thanks in advance,
Giampaolo

View Entire Topic
tobias_breyer
Contributor
0 Kudos

Hi Giampaolo,

please check the examples at the respective product documentation page. Maybe you have overlooked it, because you have to expand the example to see the code:

https://help.sap.com/docs/build-process-automation/sap-build-process-automation/configuring-smtp-mai...

You should see that the scope is different. It has to be https://outlook.office.com/SMTP.Send (outlook instead of graph).

Please also refer to the troubleshooting guide linked at the bottom of the page.

Regards,

Tobias

Giampaolo
Explorer
0 Kudos

Hi Tobias,
I followed this help to set properties and the scope you suggested was my first choice, but it doesn't work.

I tried with others scopes attribuited to Azure App, but none of them work

Do you have any other suggestions?

Best Regards,
Giampaolo


P.S.
I cannot find permission SMTP.Send on Office 365 Exchange Online API