Skip to content

Commit 711e762

Browse files
committed
Addressed blocking issues from PR Review Team
1 parent ea24a98 commit 711e762

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

articles/sap/workloads/exchange-online-integration-sap-email-outbound.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,26 +64,33 @@ This guide is updated when more SAP-supported options become available.
6464
To create a new application, follow these instructions (see also [Register an application in Microsoft Entra ID](/entra/identity-platform/quickstart-register-app)):
6565

6666
1. Go to **App registrations** in the [Microsoft Entra Admin Center](https://entra.microsoft.com). Click **New registration**.
67+
6768
:::image type="content" source="media/exchange-online-integration/register-application-1.png" alt-text="Screenshot of new application registration.":::
6869

6970
2. Enter a name for the new application representing the SAP system. Select **Accounts in this organizational directory only** and click **Register**.
71+
7072
:::image type="content" source="media/exchange-online-integration/register-application-2.png" alt-text="Screenshot of register app.":::
7173

7274
### Set the SMTP.SendAsApp API application permission for the application
7375

7476
1. Go to **API Permissions** of your new app registration. Click **Add a permission**.
77+
7578
:::image type="content" source="media/exchange-online-integration/smtp-send-as-permission-1.png" alt-text="Screenshot of add new permission.":::
7679

7780
2. Switch to tab **APIs my organization uses**. Enter "Office" in the search bar. Select **Office 365 Exchange Online** from the search result list.
81+
7882
:::image type="content" source="media/exchange-online-integration/smtp-send-as-permission-2.png" alt-text="Screenshot of select Office 365 Exchange Online APIs.":::
7983

8084
3. Select **Application permissions**. Enter "SMTP" in the search bar. Expand the section **SMTP** and activate the checkbox for the permission **SMTP.SendAsApp** from the search result list. Click **Add permissions**.
85+
8186
:::image type="content" source="media/exchange-online-integration/smtp-send-as-permission-3.png" alt-text="Screenshot of add SMTP.SendAs permission.":::
8287

8388
4. Select **Remove permission** from the ellipsis menu of the **User.Read** permission in the **Microsoft Graphs** section and confirm with **Yes, remove**. Then select **Grant admin consent for <your_organization_name>** and confirm with **Yes**.
89+
8490
:::image type="content" source="media/exchange-online-integration/smtp-send-as-permission-4.png" alt-text="Screenshot of grant admin consent.":::
8591

8692
5. The API permissions should now be configured as shown in the following screenshot.
93+
8794
:::image type="content" source="media/exchange-online-integration/smtp-send-as-permission-5.png" alt-text="Screenshot of API permission setup.":::
8895

8996
### Configure application credentials
@@ -95,37 +102,47 @@ To obtain an access token from Entra ID for connecting to Exchange Online, the S
95102
Follow the instructions listed in [Add and manage application credentials in Microsoft Entra ID](/entra/identity-platform/how-to-add-credentials?tabs=client-secret) for using client ID and secret in the SAP system to obtain an access token from Entra ID.
96103

97104
1. Go to **Certificates & Secrets**. Switch to tab **Client secrets** and click **New client secret**. Enter a description for the new secret and select an expiration period. Click **Add**.
105+
98106
:::image type="content" source="media/exchange-online-integration/create-client-secret-1.png" alt-text="Screenshot of add secret.":::
99107

100108
2. Copy the value of the generated secret value to the clipboard and paste it into a temporary text file.
109+
101110
:::image type="content" source="media/exchange-online-integration/create-client-secret-2.png" alt-text="Screenshot of copy secret.":::
102111

103112
#### JWT bearer
104113

105114
Follow these instructions (see also [Add and manage application credentials in Microsoft Entra ID](/entra/identity-platform/how-to-add-credentials?tabs=certificate)) for using the JWT bearer grant in the SAP system to obtain an access token from Entra ID.
106115

107116
1. For SAP S/4HANA on-premises and SAP S/4HANA Cloud Private Edition, export the JWT signing certificate. In newer systems where transaction code SOAUTH2_CLIENT is available, click **Global Settings** and download the certificate from the **Settings for JWT Client Authentication**.
117+
108118
:::image type="content" source="media/exchange-online-integration/export-jwt-certificate-1-1.png" alt-text="Screenshot of export JWT signing certificate with SOAUTH2_CLIENT.":::
119+
109120
Otherwise use transaction code STRUST. Search for SSF application "SSF OA2CJC" (OAuth2 Client - JWT Client Authentication), double-click the **Subject** value in **Own Certificate**, and click **Export certificate**. Use **Base64** for the file format.
121+
110122
:::image type="content" source="media/exchange-online-integration/export-jwt-certificate-1.png" alt-text="Screenshot of export JWT signing certificate with STRUST.":::
111123

112124
2. For the SAP BTP ABAP Environment, select your Exchange Online communication system's **Outbound User** to export the JWT signing certificate. See [this section](#sap-btp-abap-environment) for more details.
113125

114126
3. In the Entra admin center, go to **Certificates & Secrets**. Switch to tab **Certificates** and click **Upload certificate**. Select the exported file, enter a description, and click **Add**.
127+
115128
:::image type="content" source="media/exchange-online-integration/export-jwt-certificate-2.png" alt-text="Screenshot of import JWT signing certificate.":::
116129

117130
4. The JWT signing certificate is uploaded to the application.
131+
118132
:::image type="content" source="media/exchange-online-integration/export-jwt-certificate-3.png" alt-text="Screenshot of imported JWT signing certificate.":::
119133

120134
### Register the application service principal in Exchange Online
121135

122136
1. Go to **Overview** of the new application registration. Click on the link to the **Managed application in local directory**.
137+
123138
:::image type="content" source="media/exchange-online-integration/register-service-principal-1.png" alt-text="Screenshot of navigate to service principal.":::
124139

125140
2. Click **Copy to clipboard** for the **Application ID** and **Object ID**. Copy and paste both values into a temporary text file.
141+
126142
:::image type="content" source="media/exchange-online-integration/register-service-principal-2.png" alt-text="Screenshot of copy service principal ID.":::
127143

128144
3. Go to the [Exchange admin center](https://admin.exchange.microsoft.com/) and open a Cloud Shell. Click **Switch to PowerShell**.
145+
129146
:::image type="content" source="media/exchange-online-integration/register-service-principal-3.png" alt-text="Screenshot of start Cloud Shell.":::
130147

131148
4. Run the following PowerShell commands in the Cloud Shell.
@@ -138,12 +155,15 @@ Otherwise use transaction code STRUST. Search for SSF application "SSF OA2CJC" (
138155
Add-MailboxPermission -Identity $mailboxName -User $servicePrincipalObjId -AccessRights FullAccess
139156
```
140157
The output should be as follows:
158+
141159
:::image type="content" source="media/exchange-online-integration/register-service-principal-4.png" alt-text="Screenshot of PowerShell script output.":::
142160
143161
5. Verify that the service principal has the permission on the mailbox. Go to **Mailboxes**. Select the SAP system's mailbox and switch to the tab **Delegation**. Click **Edit**.
162+
144163
:::image type="content" source="media/exchange-online-integration/register-service-principal-5.png" alt-text="Screenshot of service principal registration.":::
145164
146165
6. Your application's service principal is listed as a delegate with full access permissions to open the SAP system's mailbox and behave as the mailbox owner.
166+
147167
:::image type="content" source="media/exchange-online-integration/register-service-principal-6.png" alt-text="Screenshot of delegate.":::
148168
149169
### Activate SMTP AUTH for the mailbox
@@ -153,9 +173,11 @@ To allow the SAP system to send email messages, the assigned mailbox must enable
153173
1. Go to the [Microsoft 365 Admin Center](https://admin.microsoft.com/).
154174
155175
2. Go to **Active users**. Select your SAP system's mailbox user from the list, and switch to the **Mail** tab. Click **Manage email apps**.
176+
156177
:::image type="content" source="media/exchange-online-integration/activate-smtp-authentication-1.png" alt-text="Screenshot of open email app settings.":::
157178
158179
3. Ensure that the checkbox for **Authenticated SMTP** is activated. If not, activate it, and save the changes.
180+
159181
:::image type="content" source="media/exchange-online-integration/activate-smtp-authentication-2.png" alt-text="Screenshot of activate SMTP AUTH.":::
160182
161183
### Optional: Test the configuration in Entra and Exchange Online with the SMTP OAuth test client
@@ -173,6 +195,7 @@ You can test the new configuration with a simple [SMTP OAuth test client app](ht
173195
2. Follow the steps described in the test client's [README](https://github.com/microsoft/smtpoauth2/blob/main/java/README.md) file.
174196
175197
3. Run the test client with your values for **client ID**, **client secret**, **tenant ID**, and **mailbox name**. You can optionally pass a **recipient email address** to receive a test mail. Check the test client output for a message that confirms successful connection to Exchange Online with OAuth 2.0.
198+
176199
:::image type="content" source="media/exchange-online-integration/test-smtp-oauth-1.png" alt-text="Screenshot of SMTP OAuth test client app output.":::
177200
178201
### Configure SMTP OAuth in SAP
@@ -182,6 +205,7 @@ Follow the corresponding section of your SAP environment.
182205
#### SAP S/4HANA on-premises and SAP S/4HANA Cloud Private Edition
183206
184207
1. Ping or telnet **smtp.office365.com** on port **587** from your SAP application server to make sure ports are open and accessible.
208+
185209
:::image type="content" source="media/exchange-online-integration/telnet-scot-sec-1-1.png" alt-text="Screenshot of ping.":::
186210
187211
2. Make sure SAP Internet Communication Manager (ICM) parameter is set in your instance profile. See this example:
@@ -191,29 +215,35 @@ Follow the corresponding section of your SAP environment.
191215
| icm/server-port-1 | PROT=SMTP,PORT=25000,TIMEOUT=180,TLS=1 |
192216
193217
3. Restart ICM service from SMICM transaction and make sure SMTP service is active.
218+
194219
:::image type="content" source="media/exchange-online-integration/scot-smicm-sec-1-3.png" alt-text="Screenshot of ICM setting.":::
195220
196221
4. Activate SAPConnect service in SICF transaction.
222+
197223
:::image type="content" source="media/exchange-online-integration/scot-smtp-sec-1-4.png" alt-text="Screenshot of SAP Connect setting in SICF.":::
198224
199225
5. You need to configure an OAuth 2.0 Client Profile for the integration. SAP delivers a standard OAuth 2.0 Profile “BCS_MAIL”, which can be used directly. Alternatively, you can create your own OAuth 2.0 Profile and use it for email outbound communication with Exchange Online.
200226
201227
6. Use transaction SBCS_MAIL_CONFIGSMTP to enter all relevant information for the SMTP configuration for outbound communication. Select **OAuth2** as the **Authentication Method**, and enter the values for **OAuth 2.0 Client Profile**, **OAuth 2.0 Client Configuration**, and the authorized **OAuth 2.0 Client User**.
202228
> [!NOTE]
203229
> By activating the checkbox **Modify legacy SMTP node**, the configuration is automatically copied to the old SCOT transaction
230+
204231
:::image type="content" source="media/exchange-online-integration/mail-configuration-smtp.png" alt-text="Screenshot of SBCS_MAIL_CONFIGSMTP outbound configuration.":::
205232
206233
7. Alternatively, transaction SCOT can be used directly to enter the same information as in transaction SBCS_MAIL_CONFIGSMTP into the SMTP node.
234+
207235
:::image type="content" source="media/exchange-online-integration/mail-configuration-scot.png" alt-text="Screenshot of SCOT SMTP outbound configuration.":::
208236
209237
#### SAP BTP ABAP Environment
210238
211239
Configuration in SAP BTP ABAP Environment is done with the communication arrangement of SAP_COM_0548.
212240
213241
1. This setup requires a Communication System and the creation of a new Outbound User of type **OAuth 2.0**. Enter the **Application ID** from the application registration in Entra ID as the **OAuth 2.0 Client ID** for the **New Outbound User**. Click **Download Certificate** to export the JWT signing certificate of your SAP BTP ABAP Environment.
242+
214243
:::image type="content" source="media/exchange-online-integration/new-communication-system.png" alt-text="Screenshot of Communication System setup.":::
215244
216245
2. In the communication arrangement of SAP_COM_0548, enter the mailbox user's email address from Exchange Online for the value of property **OAuth User**. Also enter the value "https://outlook.office365.com/.default" in the field **Additional Scope**.
246+
217247
:::image type="content" source="media/exchange-online-integration/communication-arrangement.png" alt-text="Screenshot of Communication Arrangement setup.":::
218248
219249
#### SAP S/4HANA Cloud Public Edition
@@ -254,45 +284,56 @@ SMTP relay lets Microsoft 365 relay emails on your behalf by using a connector c
254284
### Step-by-step configuration instructions for SMTP relay in Microsoft 365
255285
256286
1. Obtain the public (static) IP address of the endpoint that sends the mail using one of the methods listed in the [article](../../load-balancer/load-balancer-outbound-connections.md) above. A dynamic IP address isn\'t supported or allowed. You can share your static IP address with other devices and users, but don't share the IP address with anyone outside of your company. Make a note of this IP address for later.
287+
257288
:::image type="content" source="media/exchange-online-integration/azure-portal-pip-sec-3-1.png" alt-text="Screenshot of where to retrieve the public ip on the Azure Portal.":::
258289
259290
> [!NOTE]
260291
> Find above information on the Azure portal using the Virtual Machine overview of the SAP application server.
261292
262293
2. Sign in to the [Microsoft 365 Admin Center](https://admin.microsoft.com/).
294+
263295
:::image type="content" source="media/exchange-online-integration/m365-admin-center-sec-3-2.png" alt-text="Screenshot of Microsoft 365 AC sign in.":::
264296
265297
3. Go to **Settings** -> **Domains**, select your domain (for example, contoso.com), and find the Mail Exchanger (MX) record.
298+
266299
:::image type="content" source="media/exchange-online-integration/m365-admin-center-domains-sec-3-3.png" alt-text="Screenshot of where to retrieve the domain mx record.":::
267300
268301
The Mail Exchanger (MX) record will have data for **Points to address or value** that looks similar to `yourdomain.mail.protection.outlook.com`.
269302
270303
4. Make a note of the data of **Points to address or value** for the Mail Exchanger (MX) record, which is referred to as your MX endpoint.
271304
272305
5. In Microsoft 365, select **Admin** and then **Exchange** to go to the new Exchange Admin Center.
306+
273307
:::image type="content" source="media/exchange-online-integration/m365-admin-center-exchange-sec-3-5.png" alt-text="Screenshot of Microsoft 365 Admin Center.":::
274308
275309
6. New Exchange Admin Center (EAC) portal opens.
310+
276311
:::image type="content" source="media/exchange-online-integration/exchange-admin-center-sec-3-6.png" alt-text="Screenshot of Microsoft 365 Admin Center mailbox.":::
277312
278313
7. In the Exchange Admin Center (EAC), go to **Mail flow** -> **Connectors**. The **Connectors** screen is depicted below. If you're working with the classical EAC follow step 8 as described on our [docs](/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365#step-by-step-configuration-instructions-for-smtp-relay).
314+
279315
:::image type="content" source="media/exchange-online-integration/exchange-admin-center-add-connector-sec-3-7.png" alt-text="Screenshot of Microsoft 365 Admin Center connector.":::
280316
281317
8. Click **Add a connector**
318+
282319
:::image type="content" source="media/exchange-online-integration/exchange-relay-connector-add-sec-3-8.png" alt-text="Screenshot of Microsoft 365 Admin Center connector add.":::
283320
284321
Choose "Your organization's email server".
322+
285323
:::image type="content" source="media/exchange-online-integration/new-connector-sec-3-8.png" alt-text="Screenshot of Microsoft 365 Admin Center mail server.":::
286324
287325
9. Click **Next**. The **Connector name** screen appears.
326+
288327
:::image type="content" source="media/exchange-online-integration/connector-name-section-3-9.png" alt-text="Screenshot of Microsoft 365 Admin Center connector name.":::
289328
290329
10. Provide a name for the connector and click **Next**. The **Authenticating sent email** screen appears.
291330
292331
Choose *By verifying that the IP address of the sending server matches one of these IP addresses which belong exclusively to your organization* and add the IP address from Step 1 of the **Step-by-step configuration instructions for SMTP relay in Microsoft 365** section.
332+
293333
:::image type="content" source="media/exchange-online-integration/connector-authenticate-ip-add-section-3-10-1.png" alt-text="Screenshot of Microsoft 365 Admin Center verify IP.":::
294334
295335
Review and click on **Create connector**.
336+
296337
:::image type="content" source="media/exchange-online-integration/review-connector-section-3-10-2.png" alt-text="Screenshot of Microsoft 365 Admin Center review.":::
297338
:::image type="content" source="media/exchange-online-integration/connector-created-sec-3-10-3.png" alt-text="Screenshot of Microsoft 365 Admin Center review security settings.":::
298339
@@ -303,13 +344,15 @@ SMTP relay lets Microsoft 365 relay emails on your behalf by using a connector c
303344
1. Make sure SAP ICM Parameter and SMTP service is activated as explained in Option 1 (steps 2-4).
304345
2. Go to SCOT transaction in SMTP node as shown in previous steps of Option 1.
305346
3. Add mail Host as Mail Exchanger (MX) record value noted in Step 4 (yourdomain.mail.protection.outlook.com).
347+
306348
:::image type="content" source="media/exchange-online-integration/scot-smtp-connection-relay-sec-3-3.png" alt-text="Screenshot of SMTP config in SCOT.":::
307349
308350
Mail host: yourdomain.mail.protection.outlook.com
309351
310352
Port: 25
311353
312354
4. Click "Settings" next to the Security field and make sure TLS is enabled if possible. Also make sure no prior logon data regarding SMTP AUTH is present. Otherwise delete existing records with the corresponding button underneath.
355+
313356
:::image type="content" source="media/exchange-online-integration/scot-smtp-connection-relay-tls-sec-3-4.png" alt-text="Screenshot of SMTP security config in SCOT.":::
314357
315358
5. Test the configuration using a test email from your SAP application with transaction SBWP and check the status in SOST transaction.
-33.5 KB
Loading

0 commit comments

Comments
 (0)