https://raw.githubusercontent.com/ajmaradiaga/feeds/main/scmt/members/sap-champions/Martin-Pankraz.xmlSAP Community - Martin Pankraz2025-05-18T00:00:03.221448+00:00python-feedgenMartin Pankraz in SAP Communityhttps://community.sap.com/t5/technology-blog-posts-by-members/nice-patch-sap-revisiting-your-sap-btp-security-measures-after-ai-core/ba-p/13770662Nice patch SAP! Revisiting your SAP BTP security measures after AI Core vulnerability fix2024-07-25T10:46:43.272000+02:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<P>Dear community,</P><P>SAP recently fixed a critical vulnerability in the SAP AI Core service that could have allowed attackers to access sensitive data in the multi-tenant environment. This issue, dubbed "SAPwned", was responsibly disclosed and publicly shared on July 18 after it was patched. You can read more about it <A href="https://thehackernews.com/2024/07/sap-ai-core-vulnerabilities-expose.html" target="_blank" rel="noopener nofollow noreferrer">here</A>.</P><P>Bottom line: SAP shows its commitment to security and timely patching of its cloud services. But remember, SAP BTP - like any cloud platform - is based on a shared responsibility model. That means you need to do your part to protect your data and applications too:</P><UL><LI>Pick secure authentication means (no Basic AUTH is not one of them!),</LI><LI>Be conscious that every endpoint exposed by SAP BTP like Microsoft365 lives on the Internet by design,</LI><LI>Scope Cloud Foundry + Kyma app access, and user roles to the minimum rights needed,</LI><LI>When using the popular” OAuth2 client credentials grant” with service keys rotate your secrets (at best automatically regularly)! Have your pick from app based solution <A href="https://github.com/Azure/AzureAD-AppSecretManager" target="_blank" rel="noopener nofollow noreferrer">like this</A>, PowerShell <A href="https://github.com/Azure/KeyVault-Secrets-Rotation-AADApp-PowerShell" target="_blank" rel="noopener nofollow noreferrer">module</A> and <A href="https://community.sap.com/t5/technology-blogs-by-members/automatic-sap-btp-trust-store-certificate-renewal-with-azure-key-vault-or/ba-p/13565138" target="_blank">blog on automatic cert renewal</A>.</LI><LI>Establish a continuous process to harden your SAP cloud workloads. It is not a one stop shop.</LI></UL><P>Ever heard about “MFA fatigue”? Plain Multi-Factor-Authentication is not good enough anymore today. Additionally, enforce Conditional Access to SAP BTP service through integration the SAP ID Service or the SAP Identity Authentication Service with the corporate identity provider of your choice. See <A href="https://learn.microsoft.com/entra/fundamentals/scenario-azure-first-sap-identity-integration" target="_blank" rel="noopener nofollow noreferrer">here</A> how to do it with Microsoft Entra ID.</P><P> </P><P><div class="video-embed-center video-embed"><iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Frn3EMXX28EE%3Ffeature%3Doembed&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Drn3EMXX28EE&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Frn3EMXX28EE%2Fhqdefault.jpg&type=text%2Fhtml&schema=youtube" width="400" height="225" scrolling="no" title="#208 - The one with Sentinel for SAP BTP (Will King, Yossi Hasson, Martin Pankraz) | SAP on Azure" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></div></P><P> </P><H1 id="toc-hId-892014405">Second line of defense: Automatic detections based on the SAP Audit Log Service</H1><P>Most of the <A href="https://help.sap.com/docs/btp/sap-business-technology-platform/security-events-logged-by-cf-services" target="_blank" rel="noopener noreferrer">BTP based services</A> in the Cloud Foundry environment provided by SAP automatically write to the SAP Audit Log Service. Each service lists the standardized events that are propagated.</P><P>SAP has a <A href="https://community.sap.com/t5/technology-blogs-by-sap/exploring-the-sap-audit-log-service/ba-p/13533521" target="_blank">nice video</A> on the general workings of the SAP Audit Log Service on BTP.</P><P><FONT size="4"><STRONG>This is a good start, but how useful are log entries that record a compromise if they are overlooked and hidden among countless normal entries?</STRONG></FONT></P><P data-unlink="true">I use the <A href="https://learn.microsoft.com/azure/sentinel/sap/sap-btp-solution-overview" target="_blank" rel="noopener nofollow noreferrer">Microsoft Sentinel for SAP BTP solution</A> - which went into General Availability state this week - as an example for running automatic detections via built-in analytic rules. It connects to your subaccounts and global account ingesting all audit logs that are written to your registered Audit Log Management service instances. Polling interval is 10mins when deployed from the Azure Portal by default. Configure down to 1 min if needed using <A href="https://learn.microsoft.com/azure/sentinel/data-connector-connection-rules-reference#request-configuration" target="_blank" rel="noopener nofollow noreferrer">ARM API</A>.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Architecture diagram of Sentinel solution for SAP BTP" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/143381iB47BA18DBB0843B0/image-size/large?v=v2&px=999" role="button" title="Picture1.png" alt="Architecture diagram of Sentinel solution for SAP BTP" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Architecture diagram of Sentinel solution for SAP BTP</span></span></P><P> </P><P> </P><P> </P><P><SPAN>It comes with out-of-the-box content. Check out the alert “Failed access attempts across multiple Business Application Studio accounts” for instance. Password spray attack anyone?</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot of Sentinel for SAP BTP solution content with out-of-the-box detections and workbooks" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/141134iB15E352F76DACEF1/image-size/large?v=v2&px=999" role="button" title="Picture1.png" alt="Screenshot of Sentinel for SAP BTP solution content with out-of-the-box detections and workbooks" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Screenshot of Sentinel for SAP BTP solution content with out-of-the-box detections and workbooks</span></span></P><P>Once I have <A href="https://learn.microsoft.com/azure/sentinel/sap/deploy-sap-btp-solution" target="_blank" rel="noopener nofollow noreferrer">onboarded my subaccount</A> (I named it SAP-AI-Core-playground), I can go wild on the ingested log entries, apply the threat intel functions, and built analytic rules. Let's browse the entries via the Kusto query language. The standard table SAPBTPAuditLog_CL holds all audit log info for your registered SAP BTP subaccounts:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot of simple KQL for SAP BTP" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/141367i6D94B79A7A79F68B/image-size/large?v=v2&px=999" role="button" title="Picture1.png" alt="Screenshot of simple KQL for SAP BTP" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Screenshot of simple KQL for SAP BTP</span></span></P><P>The Message contains the JSON payload BTP provides for each message as well as the involved BTP service identifier.</P><P><FONT size="4"><STRONG>Looking at audit messages is nice, but you may<SPAN> go one step further by applying automatic action like blocking the SAP BTP users.</SPAN></STRONG></FONT></P><P><SPAN>Below Screenshot shows the part of the process triggered by the included playbook. The SAP security team gets notified with evidence of the compromise, offering an approval option to block the user from a Microsoft Teams channel flow. Find more info </SPAN><A href="https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/from-zero-to-hero-security-coverage-with-microsoft-sentinel-for-your/ba-p/13557852" target="_blank">here</A><SPAN>. Below screenshot shows the adaptive card with a trigger from SAP Business Suite. The same is possible with triggers coming from BTP too.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot of sap btp user block approval request to SAP security team on Microsoft Teams" style="width: 498px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/141135i425AD2C35CD48194/image-size/large?v=v2&px=999" role="button" title="Picture2.png" alt="Screenshot of sap btp user block approval request to SAP security team on Microsoft Teams" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Screenshot of sap btp user block approval request to SAP security team on Microsoft Teams</span></span></P><H1 id="toc-hId-695500900"> </H1><H1 id="toc-hId-498987395">The AI Core Service audit log entries alone are not useful</H1><P>Threat protection-wise correlation with other signals in your company is required, because a single SAP AI Core event like “Successful retrieval of object store secret” does not tell you anything. See below a Kusto query working off the AI Core audit log info ingested by the Sentinel for SAP BTP solution.</P><P><EM>Note: SAP publishes the available events for all the Cloud Foundry based services <A href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/auditing-and-logging-information" target="_blank" rel="noopener noreferrer">here</A>. </EM></P><P>It identifies entries on my BTP subaccount related to AI Core activity and cross-references the IP address involved in the login and its country of origin. In my sample below I use the built-in function <A href="https://learn.microsoft.com/azure/data-explorer/kusto/query/geo-info-from-ip-address-function" target="_blank" rel="noopener nofollow noreferrer">geo_info_from_ip_address()</A> to learn if the BTP client remote address originated from Germany or not. Assumption here is that all my BTP developers are based there. Think about sanctioned countries lists etc.</P><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-javascript"><code>//flag unexpected logins from countries other than Germany
let myBTPDevelopers = dynamic(['Germany']);
let login_messages = dynamic(['ClientAuthenticationSuccess','UserAuthenticationSuccess']);
SAPBTPAuditLog_CL
| where SubaccountName == "SAP-AI-Core-playground"
| where Message has_any (login_messages)
| extend ip_ = tostring(Message.ip)
| extend country = geo_info_from_ip_address(ip_)['country']
| where country !in (myBTPDevelopers);</code></pre><P> </P><P> </P><P> </P><P> </P><P>For a smoke test I teleported myself into the land of leprechauns<span class="lia-unicode-emoji" title=":rainbow:">🌈</span>, steep cliffs, and mysterious celtic culture<span class="lia-unicode-emoji" title=":four_leaf_clover:">🍀</span> using an Azure VM. Marvel at the rule that identifies that mischieveous btp user!</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot of found btp login from Ireland" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/141499iD40F77EF87B0AF7F/image-size/large?v=v2&px=999" role="button" title="Picture2.png" alt="Screenshot of found btp login from Ireland" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Screenshot of found btp login from Ireland</span></span></P><P>The next sample uses the <A href="https://learn.microsoft.com/azure/sentinel/understand-threat-intelligence" target="_blank" rel="noopener nofollow noreferrer">Threat Intelligence</A> feature to verify if the BTP remote access can be traced back to a feed of known problematic IP indicators (e.g. a bot network). I maintained it on Sentinel on the Threat Management section using the IP known to BTP for my recent logins to the SAP AI Core service to trigger a result. In real life you would take the IPs from a threat intel feed of course. I don't have a bot net handy though<span class="lia-unicode-emoji" title=":winking_face:">😉</span>.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot of Sentinel Threat Management experience" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/141136i039C7B6EA1D1B723/image-size/large?v=v2&px=999" role="button" title="Picture3.png" alt="Screenshot of Sentinel Threat Management experience" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Screenshot of Sentinel Threat Management experience</span></span></P><P> That makes it available to my Kusto query as below. See below the screenshot of the result:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot of Kusto query result filtered by problematic IPs" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/141137iB57CB9FC2D659821/image-size/large?v=v2&px=999" role="button" title="Picture4.png" alt="Screenshot of Kusto query result filtered by problematic IPs" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Screenshot of Kusto query result filtered by problematic IPs</span></span></P><P> </P><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-javascript"><code>//flag unexpected logins from IP indicators from Sentinel
let ips = ThreatIntelligenceIndicator
| distinct NetworkIP = tostring(NetworkIP);
let login_messages = dynamic(['ClientAuthenticationSuccess','UserAuthenticationSuccess']);
SAPBTPAuditLog_CL
| where SubaccountName == "SAP-AI-Core-playground"
| where Message contains "aicore" and Message has_any (login_messages)
| extend ip_ = trim(" ", replace(@"\s", "", replace(@"\r|\n|\t", "", tostring(Message.ip))))
| join kind=inner (
ips
| extend NetworkIP_ = trim(" ", replace(@"\s", "", replace(@"\r|\n|\t", "", tostring(NetworkIP))))
) on $left.ip_ == $right.NetworkIP_;</code></pre><P> </P><P> </P><P> </P><P> </P><P>A natural next evolution of the detection would be to extend it to the "<STRONG>impossible travel</STRONG>" scenario.</P><P>These queries are simple to set up and are good to go to serve as <A href="https://learn.microsoft.com/azure/sentinel/threat-detection" target="_blank" rel="noopener nofollow noreferrer">new analytics rule</A> on the solution, don’t you think?</P><P>Let me know what other scenarios you would like to see <span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:">😊</span></P><H1 id="toc-hId-302473890"> </H1><H1 id="toc-hId-105960385">Thoughts on production readiness</H1><P>SAP’s Audit Log Service is widely adopted across the SAP BTP services and foundational to the platform.</P><P>Onboarding your subaccounts and global accounts to Sentinel for SAP BTP eases "<STRONG>subaccount sprawl</STRONG>". Customers with hundreds of subaccounts easily loose sight of what is where and what gets frequented by whom. <STRONG>Such "blind or forgotten spots" lead to exposure</STRONG> that can be prevented.</P><P>Sentinel for SAP BTP recently went into “General Availability” state, making it good to use for anyone who doesn’t like previews <span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:">😎</span></P><P>To create meaningful detections based on the SAP BTP audit log at minimum other sources, such as the Authorization and Trust Management service (XSUAA) must be considered. Enriching your threat signals with indicators from the rest of your IT landscape gets you from "SAP-security-acolyte"🧑🏻<span class="lia-unicode-emoji" title=":school:">🏫</span> to master of disaster🥷🏼.</P><P>The built-in Sentinel for SAP playbooks use SAP BTP public APIs for automatic remediation. See the user API documentation for disabling users <A href="https://api.sap.com/api/PlatformAPI/path/getUserUsingGET" target="_blank" rel="noopener noreferrer">here</A>.</P><H1 id="toc-hId--90553120"> </H1><H1 id="toc-hId--287066625">Final words</H1><P>Constantly staying ahead of attackers all the time is impossible. However, putting up a fight so they move on without doing more serious damage or at least being automatically informed about the incident puts you back in the driver’s seat.</P><P>The <A href="https://learn.microsoft.com/azure/sentinel/sap/sap-btp-solution-overview" target="_blank" rel="noopener nofollow noreferrer">Sentinel for SAP BTP solution</A> enables you to bring the SAP BTP audit log information for cross-correlation with your wider IT landscape to the Microsoft SIEM solution Sentinel. Furthermore, it powers <STRONG>automatic remediations like user block, password reset</STRONG>, and more.</P><P>Looking for R3, ERP, S/4HANA, and RISE next? <A href="https://learn.microsoft.com/azure/sentinel/sap/solution-overview" target="_blank" rel="noopener nofollow noreferrer">Here</A> you go.</P><P>For true confidence in drastic actions like blocking users, you require signals from as many sources as possible. <STRONG>Think beyond the SAP boundary and towards your complete IT landscape</STRONG>: Devices, endpoints, and suspicious logins etc. All of those touchpoints leave a trail of your attacker long before they reach SAP BTP, because of the prior phishing attempts or lateral movement etc. Have a look at <A href="https://learn.microsoft.com/azure/sentinel/sap/deployment-attack-disrupt" target="_blank" rel="noopener nofollow noreferrer">Defender XDR</A> for further info.</P><P><STRONG>What detections are you running for your BTP landscape?</STRONG> Let the community know so we can learn from each other’s security practices.</P><P>Cheers</P><P>Martin</P>2024-07-25T10:46:43.272000+02:00https://community.sap.com/t5/spend-management-q-a/re-sap-ariba-integration-with-a-third-party-system/qaq-p/13793974/comment-id/179489#M179489Re: SAP ARIBA integration with a third-party system2024-08-14T08:27:40.015000+02:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<P>Hey <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1458785">@Tural-Hajiyev</a>,</P><P>SAP integration suite would be a good starting point for your research. Have a look here: <A href="https://api.sap.com/package/SAPBusinessNetworkIntegrationwithNonSAPERP/integrationflow" target="_blank" rel="noopener noreferrer">https://api.sap.com/package/SAPBusinessNetworkIntegrationwithNonSAPERP/integrationflow</A></P><P>And this older community thread: <A href="https://community.sap.com/t5/spend-management-q-a/sap-ariba-integration-with-microsoft-dynamics/qaq-p/12151543" target="_blank">https://community.sap.com/t5/spend-management-q-a/sap-ariba-integration-with-microsoft-dynamics/qaq-p/12151543</A></P><P>Let the community know what you decided in the end with which public source <span class="lia-unicode-emoji" title=":slightly_smiling_face:">🙂</span></P><P>KR Martin</P>2024-08-14T08:27:40.015000+02:00https://community.sap.com/t5/enterprise-resource-planning-blog-posts-by-members/integrating-low-code-solutions-with-microsoft-using-sap-integration-suite/ba-p/13789298Integrating low code solutions with Microsoft using SAP Integration Suite has never been easier!2024-08-14T08:50:31.455000+02:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<P><EM>This blog is co-authored with Vinayak Adkoli (Lead Product Manager, SAP Integration Suite, SAP SE). Link to Microsoft Learn Hub for Power Platform and SAP<SPAN> </SPAN><A href="https://learn.microsoft.com/power-platform/sap/" target="_blank" rel="noopener nofollow noreferrer">here</A><span class="lia-unicode-emoji" title=":link:">🔗</span>.</EM></P><P>Dear community,</P><P>Extending SAP with low-code platforms significantly increases the speed of development, enabling rapid innovation essential for staying competitive today.</P><P class="lia-indent-padding-left-30px" style="padding-left : 30px;"><EM>Analysts predict that low code will become the preferred software development method by 2025.</EM> (<A href="https://kpmg.com/us/en/articles/2023/low-code-adoption.html" target="_blank" rel="noopener nofollow noreferrer">KPMG</A>, 2023)</P><P class="lia-indent-padding-left-30px" style="padding-left : 30px;"><EM>Forrester approximates the citizen development market to be valued at 30 billion dollars by 2028.</EM> (<A href="https://www.forrester.com/blogs/the-low-code-market-could-approach-50-billion-by-2028/" target="_blank" rel="noopener nofollow noreferrer">Forrester</A>, 2024)</P><P>However, it is crucial to maintain stringent security measures and <STRONG>respect existing SAP authorizations</STRONG>. By doing so, organizations can harness the benefits of low-code development while ensuring the protection and compliance of their SAP environment.</P><P>Oh boy, you ready for all the solutions, apps, curious interns, and mad scientists looking to interact with SAP ERP to combine with Microsoft 365? <span class="lia-unicode-emoji" title=":face_with_open_mouth:">😮</span></P><P>Fear no more! The API Management capability of SAP Integration Suite is more than ready. In our usual <STRONG>Microsoft + SAP co-engineering</STRONG> fashion, we are proud to jointly release a fully-fledged enterprise-grade API management policy to support the integration pattern.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Architecture overview of low code app using SAP APIM for Principal Propagation" style="width: 937px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149546i44A0048A9B70F4CD/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_1-1723200587279.png" alt="Architecture overview of low code app using SAP APIM for Principal Propagation" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Architecture overview of low code app using SAP APIM for Principal Propagation</span></span></P><P>It enables <STRONG>SAP Principal Propagation</STRONG> with SAP services such as SAP Gateway, S/4HANA Cloud, RISE, and many more using <STRONG>Microsoft Entra ID</STRONG> (formerly Azure AD) as Identity Provider. At the core of the solution is the proven OAuth2SAMLBearer flow.</P><P><div class="video-embed-center video-embed"><iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FnQplgEHASAI%3Ffeature%3Doembed&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DnQplgEHASAI&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FnQplgEHASAI%2Fhqdefault.jpg&type=text%2Fhtml&schema=youtube" width="400" height="225" scrolling="no" title="#211 - The one with SSO with SAP API Management and Power Platform (Vinayak Adkoli & Martin Pankraz)" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></div></P><P>This way users of your low code solutions and apps spanning the Microsoft and SAP ecosystem are mapped from their Microsoft Entra Id identities to their named SAP backend users. SAP authorizations are fully retained!</P><P>In addition to that, solving this challenge on Integration Suite level enables scaling the approach to arbitrary many different consumer solutions. <STRONG>No more re-inventing the wheel for every developer!</STRONG></P><H4 id="toc-hId-1280450457">Find the APIM policy and further guidance here on the <A href="https://api.sap.com/policytemplate/Principal_Propagation_via_Entra_Id" target="_blank" rel="noopener noreferrer">SAP Business Accelerator hub</A>.</H4><P><EM>Note that <STRONG>SuccessFactors</STRONG> requires a slightly <A href="https://api.sap.com/policytemplate/SuccessFactors_Principal_Propagation_via_Entra_Id" target="_blank" rel="noopener noreferrer">different policy</A>.</EM></P><P>Of course, you may deviate from the blueprint outlined based on your scenario across SAP BTP, SAP Graph, Integration Suite, other SAP SaaS solutions etc.</P><P> </P><TABLE><TBODY><TR><TD width="227"><P><STRONG>Approach</STRONG></P></TD><TD width="204"><P><STRONG>Principal Propagation Scenarios</STRONG></P></TD></TR><TR><TD width="227"><P>OAuth2SAMLBearer flow</P></TD><TD width="204"><P>Service to service, on-behalf-of user</P></TD></TR><TR><TD width="227"><P>Authorization Code flow</P></TD><TD width="204"><P>Interactive user session (prone to MFA interference)</P></TD></TR><TR><TD width="227"><P>Client Credentials flow</P></TD><TD width="204"><P>Service to service</P></TD></TR><TR><TD width="227"><P>X.509</P></TD><TD width="204"><P>Any</P></TD></TR></TBODY></TABLE><P><STRONG>We recommend using OAuth2SAMLBearer</STRONG>, because:</P><UL><LI>The given scenario in this blog is about app integration and identities known to Microsoft Entra ID, for the integration</LI><LI>OAuth2 is more flexible and granular control over access to resources</LI><LI>NetWeaver does not support Client Credentials flow and X509 certificates come with management overhead.</LI></UL><P>For simplicity and readability of the blog I will refer only to NetWeaver specific settings even though the approach works with any SAP product that supports OAuth2SAMLBearer.</P><P>Learn more about this space overall from the <A href="https://community.sap.com/t5/technology-blogs-by-members/principal-propagation-in-a-multi-cloud-solution-between-microsoft-azure-and/ba-p/13482071" target="_blank">blog series</A> by my magnificent colleague <A href="https://community.sap.com/t5/user/viewprofilepage/user-id/171519" target="_blank">Martin Raepple</A>.</P><P> </P><H1 id="toc-hId-696688795">A glimpse under the hood</H1><P>The API Management policy works under the assumption that trust between your <STRONG>OAuth 2.0 Server for AS ABAP</STRONG> and <STRONG>Microsoft Entra ID</STRONG> has been setup before.</P><P>Have a look at the <A href="https://github.com/MartinPankraz/SAP-MSTeams-Hero/blob/main/Towel-Bearer/103a-sap-principal-propagation-basics.md" target="_blank" rel="noopener nofollow noreferrer">developer series on our YouTube playlist</A> for a walk-through experience (be warned this was a “without-script exercise” to show pitfalls and how to overcome).</P><P><div class="video-embed-center video-embed"><iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FJGvJJnMSEHM%3Flist%3DPLvqyDwoCkBXZ85LoFrNWv9Mj88TiDAc4g&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DJGvJJnMSEHM&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FJGvJJnMSEHM%2Fhqdefault.jpg&type=text%2Fhtml&schema=youtube" width="200" height="112" scrolling="no" title="Episode 3. Configure SAP Principal Propagation with AAD and SAP OAuth server" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></div></P><P>In addition to the existing authorizations maintained on SAP each application consuming the SAP API proxy from API Management needs to be authorized on Entra ID.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_2-1723200587281.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149547i587571D597468F5E/image-size/medium?v=v2&px=400" role="button" title="MartinPankraz_2-1723200587281.png" alt="MartinPankraz_2-1723200587281.png" /></span></P><P><SPAN>See this official </SPAN><A href="https://learn.microsoft.com/entra/identity/saas-apps/sap-netweaver-tutorial" target="_blank" rel="noopener nofollow noreferrer">guide</A><SPAN> for details on the Entra ID SAML2 setup. See the difference for OAuth2SAMLBearer compared to general SAML2 below:</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_3-1723200587304.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149548i8FCC4418F9B2ABB0/image-size/medium?v=v2&px=400" role="button" title="MartinPankraz_3-1723200587304.png" alt="MartinPankraz_3-1723200587304.png" /></span><SPAN>Keep close attention to the Entity ID. It is case sensitive! I chased an error once for half a day because of that.</SPAN></P><P>Be aware that Entity ID must be unique in your Entra ID tenant. In case you want to use SAML2 for Fiori SSO and OAuth2 for SAP Principal Propagation for this SID at the same time, you need to maintain both on the Entra ID enterprise app registration. Assign an order (index) that works with your login flow. See below sample for reference.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_4-1723200587311.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149549i01605E902BEF05F3/image-size/medium?v=v2&px=400" role="button" title="MartinPankraz_4-1723200587311.png" alt="MartinPankraz_4-1723200587311.png" /></span></P><P>Have a look at my <A href="https://github.com/MartinPankraz/SAP-MSTeams-Hero/blob/main/Towel-Bearer/103a-sap-principal-propagation-basics.md" target="_blank" rel="noopener nofollow noreferrer">video series</A> for a more guided experience on the OAuth2 part. I also like <A href="https://www.itsfullofstars.de/2020/04/create-oauth-2-0-client-user/" target="_blank" rel="noopener nofollow noreferrer">this simple blog</A> series to complete the picture.</P><H2 id="toc-hId-629258009">Take care of your OAuth settings</H2><P>The steps for the OAuth configuration may vary a bit by SAP product. Here the focus is on NetWeaver.</P><P>Move on to your SAP backend and create a user for your OAuth client. For SAP NetWeaver based systems that will be a <STRONG>user of type system</STRONG> with authorizations for <STRONG>S_SCOPE</STRONG> that are relevant for the OData service you want to expose.</P><H4 id="toc-hId-690909942">Both the OAuth2 client user and your SAP end user need S_SCOPE authorization.</H4><P>Use transaction PFCG to assign the authorization objects to your role or create a new one. I like <A href="https://www.itsfullofstars.de/2020/04/oauth-3-gateway-add-authorization-s_scope-to-oauth-2-0-client-user/" target="_blank" rel="noopener nofollow noreferrer">this blog series</A> for reference.</P><P>Verify from transaction <STRONG>/n/IWFND/MAINT_SERVICE</STRONG> that your OData service is enabled for OAuth2.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_5-1723200587334.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149551iDFA8CA9029B6786D/image-size/medium?v=v2&px=400" role="button" title="MartinPankraz_5-1723200587334.png" alt="MartinPankraz_5-1723200587334.png" /></span></P><H2 id="toc-hId-236230999">Birds eye<span class="lia-unicode-emoji" title=":bird:">🐦</span> view on the overall process</H2><P>Below sequence diagram explains an initial login performing SAP Principal Propagation using the OAuth2SAMLBearer flow. There are three requests involved:</P><P>1. Low Code app login (Entra ID) invoked by the app</P><P>2. Token exchange for a SAML2 assertion (Entra ID on-behalf-of flow) invoked by API Management</P><P>3. Token exchange of SAML2 assertion issued by Entra ID to SAP access token issued by SAP OAuth2 server. The request is invoked by API Management. The result is a token carrying the authorizations set on the SAP backend (PFCG transaction) for that end user.</P><P>As stated at the beginning, the <STRONG>heavy lifting is done by the provided API Management policy</STRONG>.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_6-1723200587338.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149550i45AC47AC25CFB759/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_6-1723200587338.png" alt="MartinPankraz_6-1723200587338.png" /></span></P><P>Once a bearer access token from SAP is available, all requests can be directly served from the API Management token cache. Once it expires – typically after one hour – the refresh token is used to request a new access token. The same is true for the first login step from the low code app.</P><P> </P><H2 id="toc-hId-39717494">Import the policy into your tenant</H2><P><A href="https://api.sap.com/policytemplate/Principal_Propagation_via_Entra_Id" target="_blank" rel="noopener noreferrer">Download the policy</A><span class="lia-unicode-emoji" title=":inbox_tray:">📥</span> from the SAP Business Accelerator Hub and import the template into your SAP API Management tenant.</P><P>Learn more about configuring an API Provider with SAP Cloud Connector on <A href="https://learning.sap.com/learning-journeys/developing-with-sap-integration-suite/creating-an-api-provider_b95113e7-369f-4dd3-9773-ec4e0fde2e00" target="_blank" rel="noopener noreferrer">this SAP tutorial</A>.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_7-1723200587348.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149552iDD234964B840041E/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_7-1723200587348.png" alt="MartinPankraz_7-1723200587348.png" /></span></P><P>Apply to all the PostFlow steps of the TargetEndpoints of your APIs as you see fit. See <A href="https://learning.sap.com/learning-journeys/developing-with-sap-integration-suite/using-policies_cd5fde51-b3d2-40d3-bd71-3f2870c2b51b" target="_blank" rel="noopener noreferrer">this SAP tutorial</A> and this <A href="https://github.com/SAP/apibusinesshub-api-recipes/blob/master/recipes/README.md" target="_blank" rel="noopener nofollow noreferrer">SAP GitHub repos</A> for more details. The <STRONG>policy requires to run in the PostFlow section</STRONG> in order for the “target.basepath” to be populated.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_8-1723200587355.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149553i508C78BD54749F15/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_8-1723200587355.png" alt="MartinPankraz_8-1723200587355.png" /></span></P><P>Consider the governance and security trade-offs between mighty policies and SAP OAuth clients authorized for everything vs. a multitude of clients for each API and scope.</P><P> </P><H2 id="toc-hId--156796011">Configure the policy using a key value map</H2><P>All the configuration needed for earlier shown token exchange flow is best provided with an encoded key value map (I recommend starting with un-encoded one, when you do this the first time for simpler troubleshooting). Create a new encrypted one called “SAPPrincipalPropagationMap”. The name is referenced on the provided policy.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_9-1723200587365.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149554i5F0AFA2E01EF34F7/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_9-1723200587365.png" alt="MartinPankraz_9-1723200587365.png" /></span></P><P> </P><P>Fill the values as per your environment:</P><P> </P><TABLE><TBODY><TR><TD width="200"><P><STRONG>Key</STRONG></P></TD><TD width="200"><P><STRONG>Value sample</STRONG></P></TD><TD width="200"><P><STRONG>Hints</STRONG></P></TD></TR><TR><TD width="200"><P><STRONG>entra-id-tenant-id</STRONG></P></TD><TD width="200"><P>12a345bc-1234-56ab-78ab-zzzzzzzzz</P></TD><TD width="200"><P>Find it on the Azure portal (e.g. <A href="https://portal.azure.com/?feature.customportal=false#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/Overview" target="_blank" rel="noopener nofollow noreferrer">here</A>)</P></TD></TR><TR><TD width="200"><P><STRONG>issuer</STRONG></P></TD><TD width="200"><P><A href="https://sts.windows.net/12a345bc-1234-56ab-78ab-zzzzzzzzz/" target="_blank" rel="noopener nofollow noreferrer">https://sts.windows.net/12a345bc-1234-56ab-78ab-zzzzzzzzz/</A></P></TD><TD width="200"><P>The prefix is fixed. Only the tenant id is dynamic.</P><P> </P><P><A href="https://login.microsoftonline.com/12a345bc-1234-56ab-78ab-zzzzzzzzz%20for%20v2" target="_blank" rel="noopener nofollow noreferrer">https://login.microsoftonline.com/12a345bc-1234-56ab-78ab-zzzzzzzzz</A> for v2 endpoints</P></TD></TR><TR><TD width="200"><P><STRONG>entra-id-audience</STRONG></P></TD><TD width="200"><P>api://999abce-7777-abcd-a6c9-zzzzzzzzzzz</P></TD><TD width="200"><P>The globally unique Application ID URI from the Entra ID app registration representing your SAP API Management instance</P></TD></TR><TR><TD width="200"><P><STRONG>AADRegisteredAppClientId</STRONG></P></TD><TD width="200"><P>999abce-7777-abcd-a6c9-zzzzzzzzzzz</P></TD><TD width="200"><P>The Application (client) id of the Entra ID app registration representing your SAP API Management instance.</P></TD></TR><TR><TD width="200"><P><STRONG>AADRegisteredAppClientSecret</STRONG></P></TD><TD width="200"><P> </P></TD><TD width="200"><P>The secret created for the application 999abce-7777-abcd-a6c9-zzzzzzzzzzz</P></TD></TR><TR><TD width="200"><P><STRONG>AADSAPResource</STRONG></P></TD><TD width="200"><P><A href="https://a4h100" target="_blank" rel="noopener nofollow noreferrer">https://a4h100</A></P></TD><TD width="200"><P>The provider’s name from your NetWeaver SAML setup. Typically, a URL with <A href="https://SID" target="_blank" rel="noopener nofollow noreferrer">SID</A> followed Client number</P></TD></TR><TR><TD width="200"><P><STRONG>sap-oauth-client-username</STRONG></P></TD><TD width="200"><P>ODATAOAUTH</P></TD><TD width="200"><P>User name provided on SOAUTH2 transaction (/sap/bc/webdynpro/sap/oauth2_config?sap-client=100)</P><P> </P><P>Create a system user on SU01 with minimum rights (S_SCOPE) and reference that on SOAUTH2.</P><P>Don’t forget to assign authorized scope.</P></TD></TR><TR><TD width="200"><P><STRONG>sap-oauth-client-password</STRONG></P></TD><TD width="200"><P> </P></TD><TD width="200"><P>This is only used to request tokens not to authenticate to SAP.</P></TD></TR><TR><TD width="200"><P><STRONG>sap-oauth-scope</STRONG></P></TD><TD width="200"><P>ZPRODUCTSVIEW_CDS_0001</P></TD><TD width="200"><P>The scope assigned on SOAUTH2. If multiple make a space-separated list.</P></TD></TR><TR><TD width="200"><P><STRONG>SAPOAuthServerAdress</STRONG></P><P><STRONG>ForTokenEndpoint</STRONG></P></TD><TD width="200"><P>a4h-internal.cloudapp.net:44301</P></TD><TD width="200"><P>Host and port of the target SAP OAuth server. When cloud connector is used, put the virtual hostname and port.</P></TD></TR></TBODY></TABLE><P> </P><P>Adjust the name of the API provider as per your setup in the policy elements “RefreshSAPToken”, “fetchSAPOAuthToken”, and “GetCSRFToken”.</P><P> </P><H2 id="toc-hId--353309516">SAP Cloud Connector settings are minimal</H2><P>In this scenario all authentication means are done by the SAP API Management policy. Therefore, the configuration for the connected on-premises API provider (your SAP Cloud Connector) is reduced to the host and port only.</P><P><STRONG>Keep Authentication on NONE</STRONG>. But be assured that the OAuth2SAMLBearer flow has your back. Additional auth config on the Cloud Connector would <STRONG>either be redundant or interfere with the setup</STRONG>.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_10-1723200587374.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149555i41A84EB8ECF67601/image-size/medium?v=v2&px=400" role="button" title="MartinPankraz_10-1723200587374.png" alt="MartinPankraz_10-1723200587374.png" /></span></P><P> </P><P>Note: The Principal Propagation option on the Cloud Connector connection config uses short-lived X.509 certificates and the purpose of the scenario outlined in this blog was about API only approaches.</P><P> </P><H2 id="toc-hId--549823021">Authorize the consuming application with API Management</H2><P>Authorize the Power Automate SAP OData connector to request tokens for your API Management instance using its client id: <STRONG>6bee4d13-fd19-43de-b82c-4b6401d174c3</STRONG> assigning the <STRONG>user_impersonation</STRONG> scope.</P><P>Verify the id from the <A href="https://learn.microsoft.com/azure/sap/workloads/expose-sap-odata-to-power-platform?#sap-odata-connector-in-power-platform" target="_blank" rel="noopener nofollow noreferrer">Microsoft docs</A>.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_11-1723200587409.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149556i9EFCB4910D321877/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_11-1723200587409.png" alt="MartinPankraz_11-1723200587409.png" /></span></P><P> </P><P>Next, verify the client id of your API Management instance is authorized on the app registration attached to your target SAP product (in my sample SAP NetWeaver). And because I was lazy, I gave it the same name. Check the required scope is ticked too ("Scopes = 1" on the bottom table of the screenshot below).</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_12-1723200587427.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149557iD8D069BD0ADF9475/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_12-1723200587427.png" alt="MartinPankraz_12-1723200587427.png" /></span></P><P> </P><P>Be aware that your internal policies might require you to actively assign users or groups to the enterprise app registration. Otherwise, you will get an error before you even get to SAP. Been there, done that. Just saying <span class="lia-unicode-emoji" title=":winking_face:">😉</span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_13-1723200587440.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149558i4ED9938A420B934C/image-size/medium?v=v2&px=400" role="button" title="MartinPankraz_13-1723200587440.png" alt="MartinPankraz_13-1723200587440.png" /></span></P><P> </P><H2 id="toc-hId--746336526">The final mile of integration</H2><P>Ok, all homework is done. Now we get to go outside and enjoy the “low code” sun <span class="lia-unicode-emoji" title=":sun_with_face:">🌞</span> Create your SAP OData connection, choose the authentication type Microsoft Entra ID and paste the URI of the Entra ID app registration that represents your API Management.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_14-1723200587456.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149560iF20249E61471336E/image-size/medium?v=v2&px=400" role="button" title="MartinPankraz_14-1723200587456.png" alt="MartinPankraz_14-1723200587456.png" /></span></P><P> </P><P>Clicking on <STRONG>Sign in</STRONG> triggers the $metadata request to your OData endpoint to pull available values.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_15-1723200587459.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149559i4D1D1ED38119112E/image-size/medium?v=v2&px=400" role="button" title="MartinPankraz_15-1723200587459.png" alt="MartinPankraz_15-1723200587459.png" /></span></P><P>The connection is now authorized with the user you supplied. However, each user with whom the flow is shared will be authorizing its use of the connection on first call again with their identity.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_16-1723200587462.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149562iB68079A85DE8EA29/image-size/medium?v=v2&px=400" role="button" title="MartinPankraz_16-1723200587462.png" alt="MartinPankraz_16-1723200587462.png" /></span></P><H1 id="toc-hId--302192667">Hints on troubleshooting</H1><UL><LI>SAP’s OAuth server has a tracing tool provided as WebDynpro.<UL><LI>Open it from SAPGUI with transaction sec_diag_tool or navigate to the web app: /sap/bc/webdynpro/sap/<STRONG>sec_diag_tool</STRONG>?sap-client=YYY</LI><LI>Search for error messages and successful mapping of the Entra ID provided email to the SAP backend user.</LI><LI><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MartinPankraz_17-1723200587464.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/149561i9BC284308936B14D/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_17-1723200587464.png" alt="MartinPankraz_17-1723200587464.png" /></span><P> </P></LI></UL></LI></UL><UL><LI>All the settings are client dependent! Always double check it is being applied (or add sap-client URL parameter to be sure). Been there done that <span class="lia-unicode-emoji" title=":winking_face:">😉</span> See below transactions to verify setup:<UL><LI>SAML2 or the webdynpro: /sap/bc/webdynpro/sap/saml2?sap-client=YYY</LI><LI>SOAUTH2 or the webdynpro: /sap/bc/webdynpro/sap/oauth2_config?sap-client=YYY</LI></UL></LI></UL><P> </P><UL><LI>Before applying the APIM policy consider running the sequence of authentication calls locally (with “line of sight” to NetWeaver of course) using a REST client. See <A href="https://raw.githubusercontent.com/MartinPankraz/AzureSAPODataReader/master/Templates/AAD_APIM_SAP_Principal_Propagation.postman_collection.json" target="_blank" rel="noopener nofollow noreferrer">this Postman collection</A> for reference. Verify errors from transaction /n/IWFND/<STRONG>ERROR_LOG</STRONG>. Drop cookies in your REST client before re-testing!</LI></UL><P> </P><UL><LI>Verify the produced Entra ID tokens attributes using a safe JWT validator (e.g. <A href="https://devtoys.app/" target="_blank" rel="noopener nofollow noreferrer">DevToys</A>). Don’t share your sensitive tokens on some website for validation!<UL><LI>iss (Issuer): Should read something like <A href="https://sts.windows.net/12a3456-zzz..." target="_blank" rel="noopener nofollow noreferrer">https://sts.windows.net/12a3456-zzz...</A> or <A href="https://login.microsoftonline.com/12a3456-zzz" target="_blank" rel="noopener nofollow noreferrer">https://login.microsoftonline.com/12a3456-zzz</A>... for v2 endpoints.</LI><LI>aud (Audience): Something like “api://bbbbbb-cccc-dddd-dddd-eeeeeeee”</LI><LI>scp (Scope): “user_impersonation”</LI></UL></LI></UL><P> </P><UL><LI>For the SAML2 assertion exercise the same approach but do base64 decode and XML pretty print. Notepad++ with MIME tools -> Base64 decode and XML Tools -> pretty print does the job locally just fine. Again, don’t paste sensitive info online! Verify the following claims from your assertion:<UL><LI>AudienceRestriction -> Audience: Should be a URL containing your SID and client id, e.g. <A href="https://A4H100" target="_blank" rel="noopener nofollow noreferrer">https://A4H100</A></LI><LI>Claims: Name, email or whatever you have configured to be used to identify the named SAP backend user.</LI></UL></LI></UL><P> </P><UL><LI>While doing integration tests with the API Management policy consider decoding the <A href="https://help.sap.com/docs/sap-api-management/sap-api-management/create-key-value-map?version=Cloud&locale=en-US" target="_blank" rel="noopener noreferrer">key value map</A> or use a public one till you are confident with your setup to see immediately what config values were provided.</LI></UL><P> </P><UL><LI>Verify that your key value map changes are being pulled.</LI></UL><P> </P><UL><LI><SPAN>Cached a faulty token? Disable the caching policy step "LookupSAPTokens" and "LookupSAPRefreshTokens" using the enabled attribute on the XML or consider adding an API to clear the cache by user using the "InvalidateCache" policy step. </SPAN></LI></UL><P> </P><UL><LI><SPAN>405 Method Not allowed (SAP note <A href="https://me.sap.com/notes/0003386802" target="_self" rel="noopener noreferrer">3386802</A><span class="lia-unicode-emoji" title=":disappointed_face:">😞</span> SAP API Management generates PUT method entries for OData v2 and PATCH entries for OData v4 services. Power Automate's "Update entity" step uses the PATCH approach. In case of conflict, either choose the "Create any type of OData request" step and configure PUT instead on Power Automate or adjust the swagger definition using "Edit in API Designer" on SAP API Management to add PATCH to cater for this.</SPAN></LI></UL><P> </P><UL><LI><SPAN>POLICY_PARSING_ERROR: In case you encounter a generic "Unable to update API", make sure you have maintained a correctly named APIProvider attribute under HTTPTargetConnection entity. It is being refrenced in multiple ServiceCallout steps! </SPAN></LI></UL><H1 id="toc-hId--498706172"> </H1><H1 id="toc-hId--695219677">Thoughts on production readiness</H1><P><STRONG>SAP Integration Suite</STRONG> <STRONG>is</STRONG> more than <STRONG>ready for prime time</STRONG> as the de-facto standard for SAP heavy integrations.</P><P>The <A href="https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/75/73ffc0ae444443a23b9e661d77d637/frameset.htm" target="_blank" rel="noopener noreferrer">OAuthSAML2Bearer flow</A> is an ever green discussed in the community at length for years and fully supported by SAP for service to service Principal Propagation.</P><P>The involved Entra ID app registration client secret can be governed with Azure automation or SAP Build Apps Process Automation. See this <A href="https://microsoft.github.io/code-with-engineering-playbook/continuous-integration/dev-sec-ops/secret-management/secrets_rotation/" target="_blank" rel="noopener nofollow noreferrer">Microsoft article</A> and this <A href="https://github.com/Azure/AzureAD-AppSecretManager" target="_blank" rel="noopener nofollow noreferrer">GitHub repos</A> for reference.</P><P>Applying the <STRONG>battle-proven API management policy</STRONG> from the API hub ensures a configuration driven approach and clear update paths.</P><P>The <STRONG>SAP and Microsoft low code eco system is a natural fit</STRONG> for productivity across business needs that involve M365 (Microsoft Graph, Teams, Outlook, SharePoint Online, etc.) and SAP.</P><P>In terms of governance, <STRONG>SAP offers extensive integration with the Microsoft ecosystem</STRONG>. See <A href="https://community.sap.com/t5/technology-blogs-by-sap/supporting-multiple-api-gateways-with-sap-api-management-using-azure-api/ba-p/13680433" target="_blank">this co-authored blog</A> about SAP API Management integrating Azure APIs and <A href="https://community.sap.com/t5/technology-blogs-by-members/govern-sap-apis-living-in-various-api-management-gateways-in-a-single-place/ba-p/13682483" target="_blank">this one about Azure API Center</A> to handle a multitude of gateways in a single place.</P><P> </P><H1 id="toc-hId--891733182">Final Words</H1><P>That’s a wrap <span class="lia-unicode-emoji" title=":burrito:">🌯</span>. Today you saw how to configure SAP Principal Propagation with Microsoft Entra ID for low code solutions. The approach maps Microsoft identities to SAP named users to retain its SAP authorizations. In addition to that you learnt that a provided SAP API Management policy performs the heavy lifting of the authentication flow.</P><P>App developers and low coders no longer need to deal with the complexity of the principal propagation and get added benefit of token caching, token refresh, and CSRF handling out-of-the-box. Find the policy on the <A href="https://api.sap.com/policytemplate/Principal_Propagation_via_Entra_Id" target="_blank" rel="noopener noreferrer">SAP Business Accelerator hub</A>.</P><P>Get started from <A href="https://learn.microsoft.com/azure/sap/workloads/expose-sap-odata-to-power-platform?#sap-odata-connector-in-power-platform" target="_blank" rel="noopener nofollow noreferrer">here</A>.</P><P> </P><P>Cheers</P><P><a href="https://community.sap.com/t5/user/viewprofilepage/user-id/216068">@vinayak_adkoli</a> and Martin</P>2024-08-14T08:50:31.455000+02:00https://community.sap.com/t5/technology-q-a/re-bring-the-data-from-azure-databricks-adb-to-sap-aba/qaq-p/13804411/comment-id/4842756#M4842756Re: Bring the data from Azure DataBricks (ADB) to SAP ABA...2024-08-23T08:08:03.769000+02:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<P>Have you considered the <A href="https://github.com/microsoft/ABAP-SDK-for-Azure" target="_blank" rel="noopener nofollow noreferrer">ABAP SDK for Azure</A>? It has accelerator code for your scenario.</P><P>I believe you will find the REST API descriptions <A href="https://learn.microsoft.com/en-us/rest/api/databricks/" target="_blank" rel="noopener nofollow noreferrer">here</A>.</P><P>Cheers Martin</P>2024-08-23T08:08:03.769000+02:00https://community.sap.com/t5/technology-q-a/re-bring-the-data-from-azure-databricks-adb-to-sap-aba/qaq-p/13807964/comment-id/4843238#M4843238Re: Bring the data from Azure DataBricks (ADB) to SAP ABA...2024-08-27T07:56:18.078000+02:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<P>Yes, the accelerator code on the ABAP SDK is aimed at connecting to Azure services for pull based approaches. That was the first request on your list. Connection direction does not mean you cannot get the data. The SDK is pull-oriented but of course its code can be used for push-based too. You may connect to ADB REST api for instance and handle Managed Identities, Entra ID authentication flows etc out-of-the-box from ABAP.</P><P>Push based approaches require a completely different stack with transformations and coding your receiver on ABAP. And we haven't started discussing retry logic and mass data movement yet <span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:">😄</span> at that point a thread of comments is no longer suitable to arrive at a sustainable solution.</P>2024-08-27T07:56:18.078000+02:00https://community.sap.com/t5/technology-blog-posts-by-members/sap-private-linky-swear-with-azure-running-cloud-connector-and-sap-private/bc-p/13942082#M170390Re: SAP Private linky swear with Azure – running Cloud Connector and SAP Private Link side-by-side2024-11-19T11:59:03.301000+01:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<P>Hey <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1696610">@MofizurRahaman</a>,</P><P>there is not much more that can be said about as the blog already states.</P><P>1. SAP PLS is no replacement of the SCC. You are comparing a networking service with a software product that includes audit logging, selective RFC exosure etc. They are complementary rather than competitive. Hence, the roadmap item to enable the SCC to communicate with BTP over PLS.</P><P>2. SAP PLS supports principal propagation of course, because it is a networking solution. This space has likely evolved since my last post on it but the approach still holds true. See blog <A href="https://community.sap.com/t5/technology-blogs-by-members/sap-private-linky-swear-with-azure-propagate-your-sap-principles-via-sap/ba-p/13514641" target="_blank">part 5</A>.</P><P>3. This depends on your own needs. No official guidance published yet.</P><P>Let the community know what you decided in the end <span class="lia-unicode-emoji" title=":slightly_smiling_face:">🙂</span></P>2024-11-19T11:59:03.301000+01:00https://community.sap.com/t5/technology-blog-posts-by-members/perform-sap-principal-propagation-with-microsoft-entra-id-for-sap/ba-p/13860532Perform SAP Principal Propagation with Microsoft Entra ID for SAP SuccessFactors!2024-11-20T10:09:24.231000+01:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<P><SPAN><EM>This blog is co-authored with Vinayak Adkoli (Lead Product Manager, SAP Integration Suite, SAP SE). Link to Microsoft Learn Hub for Power Platform and SAP <A href="https://learn.microsoft.com/power-platform/sap/" target="_blank" rel="noopener nofollow noreferrer">here</A><span class="lia-unicode-emoji" title=":link:">🔗</span>.</EM></SPAN></P><P><SPAN>Dear community,</SPAN></P><P><SPAN>The <A href="https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/integrating-low-code-solutions-with-microsoft-using-sap-integration-suite/ba-p/13789298" target="_blank">last blog post</A> showed how to integrate Microsoft and SAP low code solutions with SAP services using the <STRONG>API Management</STRONG> capability of <STRONG>SAP Integration Suite</STRONG> and <STRONG>Microsoft Entra ID</STRONG> as identity provider overall. Todays post is about the specifics for <STRONG>SAP SuccessFactors</STRONG>.</SPAN></P><P><SPAN>Spoiler alert🤫: the approach stays the same! Only a slightly modified API Management policy needs to be imported. SuccessFactors uses API keys for its SAML assertions rather than an OAuth2 client id and contains your SuccessFactors company id.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_0-1725956414383.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/164365iF3E72E696385CEC5/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_0-1725956414383.png" alt="MartinPankraz_0-1725956414383.png" /></span></P><P> </P><P><SPAN>Technically you could use the same policy for NetWeaver based systems and SuccessFactors, because the “unexpected” authentication attributes are ignored as of the releases that were tested. It is a good practice though to separate the concerns. Therefore we published a separate policy instead of a one-size-fits all one with bloated number of attributes.</SPAN></P><P><SPAN>At the core of the solution is again the proven OAuth2SAMLBearer flow. See the <A href="https://help.sap.com/docs/SAP_SUCCESSFACTORS_PLATFORM/d599f15995d348a1b45ba5603e2aba9b/4e27e8f6ae2748ab9f23228dd6a31b06.html" target="_blank" rel="noopener noreferrer">official SuccessFactors docs</A> on the required SAML attributes for reference.</SPAN></P><P><SPAN>In addition to that, solving this challenge on Integration Suite level enables scaling the approach to arbitrary many different consumer </SPAN>solutions<SPAN>. No more re-inventing the wheel for every developer!</SPAN></P><H3 id="toc-hId-1177884419">Find the <A href="https://api.sap.com/policytemplate/SuccessFactors_Principal_Propagation_via_Entra_Id" target="_blank" rel="noopener noreferrer">SuccessFactors specific policy</A> on the SAP Business Accelerator Hub.</H3><P><SPAN>Of course, you may deviate from the blueprint outlined based on your scenario across SAP BTP, SAP Graph, Integration Suite, other SAP SaaS solutions etc.</SPAN></P><P> </P><H1 id="toc-hId-723205476"><SPAN>A glimpse under the hood</SPAN></H1><P><SPAN>Start your journey on SAP API Management by creating a new API provider for your SuccessFactors tenant. Be aware</SPAN><span class="lia-unicode-emoji" title=":index_pointing_up:">☝️</span><SPAN> of the different domains for the portal UI and the associated OData API endpoint! See <A href="https://userapps.support.sap.com/sap/support/knowledge/en/2215682" target="_blank" rel="noopener noreferrer">SAP note 2215682</A> for reference.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_1-1725956414399.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/164367iF2A52315213DC2F4/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_1-1725956414399.png" alt="MartinPankraz_1-1725956414399.png" /></span></P><P> </P><P><SPAN>Next, register your SuccessFactors OData API. In my sample I am taking the entity set “User”, that resides on the base path for a tenant in DC5 like so:</SPAN></P><P><SPAN><A href="https://api5.successfactors.eu/odata/v2/User/$metadata" target="_blank" rel="noopener nofollow noreferrer">https://api5.successfactors.eu/odata/v2/User/$metadata</A></SPAN></P><P><SPAN>Make sure to verify the base path of the URL (/odata/v2 vs. /odata/v2/User) of your target endpoint on API Management. See below Screenshot for reference.</SPAN></P><P><SPAN>Otherwise, you will encounter routing issues for request like /odata/v2/User(‘1000’).</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_2-1725956414406.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/164366i9CC6FB9ACFB02EBF/image-size/medium?v=v2&px=400" role="button" title="MartinPankraz_2-1725956414406.png" alt="MartinPankraz_2-1725956414406.png" /></span></P><P> </P><P><SPAN>The API Management policy works under the assumption that trust between your SAP SuccessFactors OAuth2 server and Microsoft Entra ID has been setup before. See <A href="https://help.sap.com/docs/SAP_SUCCESSFACTORS_PLATFORM/d599f15995d348a1b45ba5603e2aba9b/d9a9545305004187986c866de2b66987.html" target="_blank" rel="noopener noreferrer">this guide</A> for reference.</SPAN></P><P><SPAN>In addition to the existing authorizations maintained on SuccessFactors each application consuming the SAP API proxy from API Management need to be authorized on Entra ID.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_3-1725956414410.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/164368i0584EB755CB8CC61/image-size/medium?v=v2&px=400" role="button" title="MartinPankraz_3-1725956414410.png" alt="MartinPankraz_3-1725956414410.png" /></span></P><P> </P><P><SPAN>See this official <A href="https://learn.microsoft.com/entra/identity/saas-apps/successfactors-tutorial" target="_blank" rel="noopener nofollow noreferrer">guide</A> for details on the Entra ID setup. Be aware the linked guide refers to the SAML2 setup (not OAuth2!). See the difference for OAuth2SAMLBearer below:</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_4-1725956414426.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/164369i2904509327C43906/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_4-1725956414426.png" alt="MartinPankraz_4-1725956414426.png" /></span></P><P> </P><P><SPAN>The Entity ID can be any URI. It is a good practice though to use something that resembles your SuccessFactors tenant.</SPAN></P><P><SPAN>Be aware that Entity ID must be unique in your Entra ID tenant. In case you want to use SAML2 for SSO and OAuth2 for SAP Principal Propagation for this tenant at the same time, you need to maintain both on the Entra ID enterprise app registration. Assign an order (index) that works with your login flow.</SPAN></P><P><SPAN> </SPAN></P><H2 id="toc-hId-655774690"><SPAN>Take care of your OAuth settings</SPAN></H2><P><SPAN>The steps for the OAuth configuration may vary by SAP product. Here the focus is on SAP SuccessFactors.</SPAN></P><P><SPAN>Move on to your SuccessFactors tenant and open the app “Manage OAuth2 Client Applications” to create a new OAuth client for your Microsoft Entra ID enterprise app. Populate the values as per your environment.</SPAN></P><P><SPAN>Be aware that you need to <STRONG>copy the certificate body only</STRONG> without the header -----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_5-1725956414443.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/164370i02E60D7734B39D9B/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_5-1725956414443.png" alt="MartinPankraz_5-1725956414443.png" /></span></P><P> </P><H2 id="toc-hId-459261185"><SPAN>Import the policy into your tenant</SPAN></H2><P><SPAN>Download <A href="https://api.sap.com/policytemplate/SuccessFactors_Principal_Propagation_via_Entra_Id" target="_blank" rel="noopener noreferrer">the policy from the SAP Business Accelerator Hub</A> and import the template into your SAP API Management tenant.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_6-1725956414454.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/164372i4C53B25E651BB51E/image-size/medium?v=v2&px=400" role="button" title="MartinPankraz_6-1725956414454.png" alt="MartinPankraz_6-1725956414454.png" /></span></P><P> </P><P><SPAN>Apply to all the PostFlow steps of the TargetEndpoints of your APIs as you see fit. See <A href="https://learning.sap.com/learning-journeys/developing-with-sap-integration-suite/using-policies_cd5fde51-b3d2-40d3-bd71-3f2870c2b51b" target="_blank" rel="noopener noreferrer">this SAP tutorial</A> and this <A href="https://github.com/SAP/apibusinesshub-api-recipes/blob/master/recipes/README.md" target="_blank" rel="noopener nofollow noreferrer">SAP GitHub repos</A> for more details.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_7-1725956414461.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/164371i8727F8882B0EDB0F/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_7-1725956414461.png" alt="MartinPankraz_7-1725956414461.png" /></span></P><P> </P><P><SPAN>Consider the governance and security trade-offs between mighty policies and SAP OAuth clients authorized for everything vs. a multitude of clients for each API and scope.</SPAN></P><P> </P><H2 id="toc-hId-262747680"><SPAN>Configure the policy using a key value map</SPAN></H2><P><SPAN>All the configuration needed for earlier shown token exchange flow is best provided with an encoded key value map (I recommend starting with un-encoded one, when you do this the first time for simpler troubleshooting). Create a new encrypted one called “SAPPrincipalPropagationMap”. The name is referenced on the provided policy.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_8-1725956414472.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/164373iF5298E4C404308EF/image-size/medium?v=v2&px=400" role="button" title="MartinPankraz_8-1725956414472.png" alt="MartinPankraz_8-1725956414472.png" /></span></P><P> </P><P><SPAN>Fill the values as per your environment:</SPAN></P><TABLE><TBODY><TR><TD width="200"><P><STRONG><SPAN>Key</SPAN></STRONG></P></TD><TD width="200"><P><STRONG><SPAN>Value sample</SPAN></STRONG></P></TD><TD width="200"><P><STRONG><SPAN>Hints</SPAN></STRONG></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>entra-id-tenant-id</SPAN></STRONG></P></TD><TD width="200"><P><SPAN>12a345bc-1234-56ab-78ab-zzzzzzzzz</SPAN></P></TD><TD width="200"><P><SPAN>Find it on the Azure portal (e.g. <A href="https://portal.azure.com/?feature.customportal=false#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/Overview" target="_blank" rel="noopener nofollow noreferrer">here</A>)</SPAN></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>issuer</SPAN></STRONG></P></TD><TD width="200"><P><SPAN><A href="https://sts.windows.net/12a345bc-1234-56ab-78ab-zzzzzzzzz/" target="_blank" rel="noopener nofollow noreferrer">https://sts.windows.net/12a345bc-1234-56ab-78ab-zzzzzzzzz/</A></SPAN></P></TD><TD width="200"><P><SPAN>The prefix is fixed. Only the tenant id is dynamic.</SPAN></P><P><SPAN> </SPAN></P><P><SPAN><A href="https://login.microsoftonline.com/12a345bc-1234-56ab-78ab-zzzzzzzzz%20for%20v2" target="_blank" rel="noopener nofollow noreferrer">https://login.microsoftonline.com/12a345bc-1234-56ab-78ab-zzzzzzzzz</A> for v2 endpoints</SPAN></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>entra-id-audience</SPAN></STRONG></P></TD><TD width="200"><P><SPAN>api://999abce-7777-abcd-a6c9-zzzzzzzzzzz</SPAN></P></TD><TD width="200"><P><SPAN>The globally unique Application ID URI from the Entra ID app registration representing your SAP API Management instance</SPAN></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>AADRegisteredAppClientId</SPAN></STRONG></P></TD><TD width="200"><P><SPAN>999abce-7777-abcd-a6c9-zzzzzzzzzzz</SPAN></P></TD><TD width="200"><P><SPAN>The Application (client) id of the Entra ID app registration representing your SAP API Management instance.</SPAN></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>AADRegisteredAppClientSecret</SPAN></STRONG></P></TD><TD width="200"><P><SPAN> </SPAN></P></TD><TD width="200"><P><SPAN>The secret created for the application 999abce-7777-abcd-a6c9-zzzzzzzzzzz</SPAN></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>AADSAPResource</SPAN></STRONG></P></TD><TD width="200"><P><SPAN><A href="https://my.successfactors.eu" target="_blank" rel="noopener nofollow noreferrer">https://my.successfactors.eu</A></SPAN></P></TD><TD width="200"><P><SPAN>The provider’s name from your SuccessFactors SAML setup. </SPAN></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>sap-oauth-sf-api-key</SPAN></STRONG></P></TD><TD width="200"><P><SPAN>ABCDE1234FGH6789</SPAN></P></TD><TD width="200"><P><SPAN>API Key generated by SuccessFactors for your OAuth2 application. Instructions <A href="https://help.sap.com/docs/SAP_SUCCESSFACTORS_PLATFORM/d599f15995d348a1b45ba5603e2aba9b/6b3c741483de47b290d075d798163bc1.html" target="_blank" rel="noopener noreferrer">here</A>.</SPAN></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>sap-oauth-company-id</SPAN></STRONG></P></TD><TD width="200"><P><SPAN>SF123456</SPAN></P></TD><TD width="200"><P><SPAN>Your SuccessFactors Company id. Find <A href="https://userapps.support.sap.com/sap/support/knowledge/en/2655655" target="_blank" rel="noopener noreferrer">here</A>.</SPAN></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>SAPOAuthServerAdress</SPAN></STRONG></P><P><STRONG><SPAN>ForTokenEndpoint</SPAN></STRONG></P></TD><TD width="200"><P><SPAN>salesdemo.successfactors.eu</SPAN></P></TD><TD width="200"><P><SPAN>OAuth <A href="https://help.sap.com/docs/SAP_SUCCESSFACTORS_PLATFORM/d599f15995d348a1b45ba5603e2aba9b/223bc880027b4da7983e2f60c49d3992.html" target="_blank" rel="noopener noreferrer">endpoint</A> of your successfactors instance.</SPAN></P></TD></TR></TBODY></TABLE><P><SPAN> </SPAN><SPAN>Adjust the name of the API provider as per your setup in the policy elements “fetchSAPOAuthToken”, and “GetCSRFToken”.</SPAN></P><H2 id="toc-hId-66234175"><SPAN>The final mile of integration</SPAN></H2><P><SPAN>Ok, all homework is done. Now we get to go outside and enjoy the “low code” sun with SAP SuccessFactors </SPAN><span class="lia-unicode-emoji" title=":sun_with_face:">🌞</span><SPAN>Create your SAP OData connection in Power Automate, choose the authentication type Microsoft Entra ID and paste the URI of the Entra ID app registration that represents your API Management.</SPAN></P><P> </P><H1 id="toc-hId--259362049"><SPAN>Hints on troubleshooting</SPAN></H1><UL><LI><SPAN>Before applying the APIM policy consider running the sequence of authentication calls locally (with “line of sight” to NetWeaver of course) using a REST client. See <A href="https://raw.githubusercontent.com/MartinPankraz/AzureSAPODataReader/master/Templates/SuccessFactors%20Entra%20ID%20principal%20propagation.postman_collection.json" target="_blank" rel="noopener nofollow noreferrer">this Postman collection</A> for reference.</SPAN></LI></UL><P><SPAN> </SPAN></P><UL><LI><SPAN>Verify the produced Entra ID tokens attributes using a safe JWT validator (e.g. <A href="https://devtoys.app/" target="_blank" rel="noopener nofollow noreferrer">DevToys</A>). Don’t share your sensitive tokens on some website for validation!</SPAN><UL><LI><SPAN>iss (Issuer): Should read something like <A href="https://sts.windows.net/12a3456-zzz..." target="_blank" rel="noopener nofollow noreferrer">https://sts.windows.net/12a3456-zzz...</A> or <A href="https://login.microsoftonline.com/12a3456-zzz" target="_blank" rel="noopener nofollow noreferrer">https://login.microsoftonline.com/12a3456-zzz</A>... for v2 endpoints.</SPAN></LI><LI><SPAN>aud (Audience): Something like “api://bbbbbb-cccc-dddd-dddd-eeeeeeee”</SPAN></LI><LI><SPAN>scp (Scope): “user_impersonation”</SPAN></LI></UL></LI></UL><P><SPAN> </SPAN></P><UL><LI><SPAN>For the SAML2 assertion exercise the same approach but do base64 decode and XML pretty print. Notepad++ with MIME tools -> Base64 decode and XML Tools -> pretty print does the job locally just fine. Again, don’t paste sensitive info online! Verify the following claims from your assertion:</SPAN><UL><LI><SPAN>AudienceRestriction -> Audience: Should be a URL containing your app id, e.g. <A href="https://my.successfactors.eu" target="_blank" rel="noopener nofollow noreferrer">https://my.successfactors.eu</A> </SPAN></LI><LI><SPAN>Claims: Name, email or whatever you have configured to be used to identify the named SAP backend user.</SPAN></LI></UL></LI></UL><P><SPAN> </SPAN></P><UL><LI><SPAN>While doing integration tests with the API Management policy consider decoding the <A href="https://help.sap.com/docs/sap-api-management/sap-api-management/create-key-value-map?version=Cloud&locale=en-US" target="_blank" rel="noopener noreferrer">key value map</A> or use a public one till you are confident with your setup to see immediately what config values were provided.</SPAN></LI></UL><P><SPAN> </SPAN></P><UL><LI><SPAN>Verify that your key value map changes are being pulled.</SPAN></LI></UL><P> </P><UL><LI><SPAN>Cached a faulty token? Disable the caching policy step "LookupSAPTokens" using the enabled attribute on the XML or consider adding an API to clear the cache by user using the "InvalidateCache" policy step. </SPAN></LI></UL><P> </P><UL><LI><SPAN>405 Method Not allowed (SAP note<SPAN> </SPAN><A href="https://me.sap.com/notes/0003386802" target="_self" rel="noopener noreferrer">3386802 </A>SAP API Management generates PUT method entries for OData v2 and PATCH entries for OData v4 services. Power Automate's "Update entity" step uses the PATCH approach. In case of conflict, either choose the "Create any type of OData request" step and configure PUT instead on Power Automate or adjust the swagger definition using "Edit in API Designer" on SAP API Management to add PATCH to cater for this.</SPAN></LI></UL><P> </P><H1 id="toc-hId--455875554"><SPAN>Thoughts on production readiness</SPAN></H1><P><SPAN><STRONG>SAP Integration Suite is</STRONG> more than <STRONG>ready for prime time</STRONG> as the de-facto standard for SAP heavy integrations.</SPAN></P><P><SPAN>The <A href="https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/75/73ffc0ae444443a23b9e661d77d637/frameset.htm" target="_blank" rel="noopener noreferrer">OAuthSAML2Bearer flow</A> is an ever green discussed in the community at length for years and fully supported by SAP for service to service Principal Propagation.</SPAN></P><P><SPAN>The involved Entra ID app registration client secret can be governed with Azure automation or SAP Build Apps Process Automation. See this <A href="https://microsoft.github.io/code-with-engineering-playbook/continuous-integration/dev-sec-ops/secret-management/secrets_rotation/" target="_blank" rel="noopener nofollow noreferrer">Microsoft article</A> and this <A href="https://github.com/Azure/AzureAD-AppSecretManager" target="_blank" rel="noopener nofollow noreferrer">GitHub repos</A> for reference.</SPAN></P><P><SPAN>Applying the <A href="https://api.sap.com/policytemplate/SuccessFactors_Principal_Propagation_via_Entra_Id" target="_blank" rel="noopener noreferrer">battle-proven API management policy</A> from the API hub ensures a configuration driven approach and clear update paths.</SPAN></P><P><SPAN>PowerAutomate also supports Principal Propagation with SuccessFactors directly. However, that would be a point-to-point integration without the <STRONG>governance and security benefits of having an API Management</STRONG> solution in between.</SPAN></P><P><SPAN>The <STRONG>SAP and Microsoft low code eco system is a natural fit</STRONG> for productivity across business needs that involve M365 (Microsoft Graph, Teams, Outlook, SharePoint Online, etc.) and SAP.</SPAN></P><P><SPAN>In terms of governance, <STRONG>SAP offers extensive integration with the Microsoft ecosystem</STRONG>. See <A href="https://community.sap.com/t5/technology-blogs-by-sap/supporting-multiple-api-gateways-with-sap-api-management-using-azure-api/ba-p/13680433" target="_blank">this co-authored blog</A> about SAP API Management integrating Azure APIs and <A href="https://community.sap.com/t5/technology-blogs-by-members/govern-sap-apis-living-in-various-api-management-gateways-in-a-single-place/ba-p/13682483" target="_blank">this one about Azure API Center</A> to handle a multitude of gateways in a single place.</SPAN></P><P> </P><H1 id="toc-hId--652389059"><SPAN>Final Words</SPAN></H1><P><SPAN>That’s a wrap </SPAN><span class="lia-unicode-emoji" title=":burrito:">🌯</span><SPAN>. Today you saw how to extend the learnings from the first blog to enable SAP SuccessFactors for Power Automate with Principal Propagation through Microsoft Entra ID. The approach maps Microsoft identities to SAP named users to retain its SAP authorizations. In addition to that you learnt that a provided SAP API Management policy performs the heavy lifting of the authentication flow.</SPAN></P><P><SPAN>App developers and low coders no longer need to deal with the complexity of the principal propagation and get added benefit of token caching, and CSRF handling out-of-the-box.</SPAN></P><P>Get started from here.</P><P><SPAN>#Kudos to <A href="https://community.sap.com/t5/user/viewprofilepage/user-id/171519" target="_blank">Martin Raepple</A> for the contribution of the tricky part of the token dance.</SPAN></P><P><SPAN>Cheers</SPAN></P><P><a href="https://community.sap.com/t5/user/viewprofilepage/user-id/216068">@vinayak_adkoli</a> and Martin</P>2024-11-20T10:09:24.231000+01:00https://community.sap.com/t5/technology-q-a/re-sap-api-management-oauth-2-0-authentication-with-su/qaq-p/13943126/comment-id/4893185#M4893185Re: SAP API Management - OAuth 2.0 authentication with Su...2024-11-20T10:15:18.334000+01:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781Here is the blog that references the new policy on Entra ID + SuccessFactors: <A href="https://community.sap.com/t5/technology-blogs-by-members/perform-sap-principal-propagation-with-microsoft-entra-id-for-sap/ba-p/13860532" target="_blank">https://community.sap.com/t5/technology-blogs-by-members/perform-sap-principal-propagation-with-microsoft-entra-id-for-sap/ba-p/13860532</A>2024-11-20T10:15:18.334000+01:00https://community.sap.com/t5/technology-q-a/re-sap-api-management-oauth-2-0-authentication-with-su/qaq-p/13944142/comment-id/4893368#M4893368Re: SAP API Management - OAuth 2.0 authentication with Su...2024-11-21T10:41:34.338000+01:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781Hey Faisal, the difference is who is in charge of generating/signing the SAML assertion and who handles secrets for the trust relationship. Only IdPs are trustworthy in that sense.2024-11-21T10:41:34.338000+01:00https://community.sap.com/t5/technology-blog-posts-by-members/it-has-never-been-easier-to-print-from-sap-with-microsoft-universal-print/bc-p/13962135#M170759Re: It has never been easier to print from SAP with Microsoft Universal Print2024-12-12T14:55:30.019000+01:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<P>Hey <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1818896">@Martin-Frick</a>, hope you are enjoying down under.</P><P>Microsoft Universal print as per <A href="https://learn.microsoft.com/en-us/azure/sap/workloads/universal-print-sap-frontend#sap-web-applications" target="_blank" rel="noopener nofollow noreferrer">our docs article</A> uses the browser and OS functionalities for cloud printing from Fiori apps. What made you think otherwise? Do we need to update materials maybe?</P><P>KR Martin</P>2024-12-12T14:55:30.019000+01:00https://community.sap.com/t5/enterprise-resource-planning-blog-posts-by-members/microsoft-sentinel-for-sap-goes-agentless/ba-p/13960238Microsoft Sentinel for SAP goes agentless2024-12-17T08:53:02.437000+01:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<H5 id="toc-hId-1464676131"><SPAN>What a title during Agentic AI times </SPAN><span class="lia-unicode-emoji" title=":face_with_tears_of_joy:">😂</span></H5><P><SPAN>Dear community,</SPAN></P><P><SPAN>Bringing SAP workloads under the protection of your SIEM of choice is a primary concern for many customers out there.</SPAN></P><P class="lia-indent-padding-left-30px" style="padding-left : 30px;"><SPAN><STRONG>The window for defenders is small</STRONG></SPAN></P><P class="lia-indent-padding-left-30px" style="padding-left : 30px;"><SPAN>“Critical <STRONG>SAP vulnerabilities </STRONG>being <STRONG>weaponized in less than 72 hours</STRONG> of a patch release and new unprotected SAP applications provisioned in cloud (IaaS) environments being discovered and <STRONG>compromised in less than three hours</STRONG>.” (<A href="https://onapsis.com/resources/reports/active-cyberattacks-mission-critical-sap-applications/" target="_blank" rel="noopener nofollow noreferrer">SAP SE + Onapsis</A>, Apr 6 2024)</SPAN></P><P><SPAN>Having a turn-key solution as much as possible leads to better adoption of SAP security. Agents running in Docker containers, Kubernetes, or other self-hosted solutions are not for everyone.</SPAN></P><P><SPAN><A href="https://learn.microsoft.com/en-us/azure/sentinel/sap/solution-overview" target="_blank" rel="noopener nofollow noreferrer">Microsoft Sentinel for SAP</A>’s latest capability re-uses the SAP Cloud Connector to profit from already existing setups, established integration processes, and well-understood SAP components. Bazinga</SPAN><span class="lia-unicode-emoji" title=":collision:">💥</span></P><P> </P><H1 id="toc-hId-751831750"><SPAN>Meet agentless<span class="lia-unicode-emoji" title=":cross_mark:">❌</span><span class="lia-unicode-emoji" title=":robot_face:">🤖</span> </SPAN></H1><P><SPAN>The new integration path leverages <A href="https://help.sap.com/docs/integration-suite" target="_blank" rel="noopener noreferrer">SAP Integration Suite</A> to connect Microsoft Sentinel with your SAP systems. The Cloud integration capability of SAP Integration Suite speaks all relevant protocols, has connectivity into all the places where your SAP systems might live, is strategic for most SAP customers, and is fully <A href="https://learn.microsoft.com/en-us/azure/sap/workloads/rise-integration" target="_blank" rel="noopener nofollow noreferrer">SAP RISE</A> compatible by design.</SPAN></P><P><SPAN>Best of all: The already <A href="https://learn.microsoft.com/en-us/azure/sentinel/sap/sap-solution-security-content" target="_blank" rel="noopener nofollow noreferrer">existing SAP security content</A> (detections, workbooks, and playbooks) in Microsoft Sentinel continues to function the same way as it does for the Docker-based collector agent variant.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MartinPankraz_1-1733905028186.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/200605i7B2792433BBEB345/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_1-1733905028186.png" alt="MartinPankraz_1-1733905028186.png" /></span></P><P><SPAN>During the private preview we saw <STRONG>drastically reduced deployment times</STRONG> for SAP customers being less familiar with Docker, Kubernetes and Linux administration. Cherry on the cake: the network challenges don’t have to be tackled again. The people running your SAP Cloud Connector went through that process a long time ago. <span class="lia-unicode-emoji" title=":sign_of_the_horns:">🤘</span><STRONG>SAP Basis rocks</STRONG></SPAN><span class="lia-unicode-emoji" title=":sign_of_the_horns:">🤘</span></P><P> </P><H1 id="toc-hId-555318245"><SPAN>Ok, hook me up!</SPAN></H1><P>Customers on SAP NetWeaver 750+ may simply create additional configuration on their SAP Cloud Connector. A small set of RFC function modules are required to be reachable from SAP Integration Suite. Verify from the Sentinel documentation for the latest info.</P><P>Depending on your SAP version, you might need to install <SPAN><A href="https://me.sap.com/notes/3054326" target="_blank" rel="noopener noreferrer">SAP note 3054326</A></SPAN> to enable the remote call of the audit log API</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MartinPankraz_2-1733905028204.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/200606iA95DD4DD70C0E1C5/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_2-1733905028204.png" alt="MartinPankraz_2-1733905028204.png" /></span></P><P>Move on to the Destination maintenance view on your Subaccount on SAP Business Technology Platform. Add an RFC connection matching the details of your SAP Cloud Connector configuration. Consult <SPAN><A href="https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/configure-access-control-rfc" target="_blank" rel="noopener noreferrer">SAP’s official documentation</A></SPAN> for more details.</P><P> </P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MartinPankraz_3-1733905028220.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/200607i91A8952FDAECF268/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_3-1733905028220.png" alt="MartinPankraz_3-1733905028220.png" /></span></P><P>Finish the exercise by providing a user on SAP with the required authorizations to call the mentioned remote function modules. Find a transport to bring a pre-configured role <SPAN><A href="https://learn.microsoft.com/azure/sentinel/sap/preparing-sap#configure-the-microsoft-sentinel-role" target="_blank" rel="noopener nofollow noreferrer">here</A></SPAN> for your convenience.</P><P>Everyone else below SAP NetWeaver 750, reach out to us to talk more details for older AS ABAP releases. Given the audit log API evolution, a different configuration for the integration package is required.</P><H1 id="toc-hId-358804740"><SPAN>Community Extensions - Because Security is a Team Sport </SPAN><span class="lia-unicode-emoji" title=":handshake:">🤝</span></H1><P>The Microsoft Sentinel for SAP journey doesn't stop with official Microsoft offerings in SAP Integration Suite! We are expanding the proven community track to the agentless approach. Build on top of the platform to further enhance your SAP security operations tailored to your needs.</P><P>Partners, ISVs, and first and foremost customers are invited to share, contribute, and request additional artifacts.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MartinPankraz_0-1745571623740.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/254642i7A15DC268B636B38/image-size/medium?v=v2&px=400" role="button" title="MartinPankraz_0-1745571623740.png" alt="MartinPankraz_0-1745571623740.png" /></span></P><P> </P><P>Check out the <SPAN><A href="https://github.com/Azure-Samples/Sentinel-For-SAP-Community" target="_blank" rel="nofollow noopener noreferrer">Sentinel For SAP Community repository</A></SPAN> where you'll find the first set of Integration templates for you to build upon for additional security workflows.</P><H3 id="toc-hId-420456673"><SPAN>What is already there?</SPAN></H3><P>The solution package features an SAP Integration Suite integration flow for SOAR use cases. With that you may re-use the same integration approach that the agentless data connector uses. This means requesting SAP user blocks or SAP audit log reactivation can now be done without any additional proxies like Microsoft On-premises-Data-Gateway, separate virtual network injection or the likes. Not too bad, huh?</P><P>I especially love seeing customers and partners contributing their expertise to make SAP environments more secure for everyone. This is what community is all about!</P><H1 id="toc-hId--34222270"><SPAN>Thoughts on production readiness</SPAN></H1><P><SPAN>SAP Integration Suite and SAP Cloud Connector are among the most used SAP Cloud components for decades now and are completely ready for prime time as they say.</SPAN></P><P><SPAN>The new agentless offering of the Microsoft Sentinel for SAP solution is currently <A href="https://aka.ms/SentinelSAPAgentlessSignUp" target="_blank" rel="noopener nofollow noreferrer">in preview</A> but reuses fully mature capabilities and leverages <A href="https://learn.microsoft.com/azure/sentinel/sap/sap-solution-security-content" target="_blank" rel="noopener nofollow noreferrer">existing security content</A>. It will be expanded based on your feedback and requirements.</SPAN></P><P><SPAN>The integration marks your steppingstone to bring your SAP threat signals into the <A href="https://learn.microsoft.com/unified-secops-platform/overview-unified-security" target="_self" rel="nofollow noopener noreferrer">Unified Security Operations Platform</A> – a combination of Defender XDR and Sentinel – that looks beyond SAP at your whole IT estate.</SPAN></P><P><SPAN>Microsoft Sentinel solution for SAP applications is certified for SAP S/4HANA Cloud, Private Edition RISE with SAP, and SAP S/4HANA on-premises. So, you are all good to go </SPAN><span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:">😎</span></P><P> </P><H1 id="toc-hId--230735775"><SPAN>Final Words</SPAN></H1><P><SPAN>That’s a wrap </SPAN><span class="lia-unicode-emoji" title=":burrito:">🌯</span><SPAN>. You learned today:</SPAN></P><UL><LI><SPAN>All there is to know about <STRONG>going agentless</STRONG> with the Microsoft Sentinel for SAP solution,</SPAN></LI><LI><SPAN>Where to find community extensions to the official Microsoft integration package to extend with your own flows on SAP Integration Suite,</SPAN></LI><LI><SPAN>How important it is to <STRONG>bring SAP under the protection of your central SIEM</STRONG>, and that</SPAN></LI><LI><SPAN>Leveraging existing SAP integration components gets you up and running securely, SAP RISE future proof, and in no time.</SPAN></LI></UL><P>Get started from <A href="https://learn.microsoft.com/azure/sentinel/sap/deployment-overview?tabs=agentless" target="_blank" rel="noopener nofollow noreferrer">here</A>.</P><P><SPAN>#Kudos to the amazing Sentinel team!</SPAN></P><P><SPAN> </SPAN></P><P><SPAN>Cheers</SPAN></P><P><SPAN>Martin</SPAN></P>2024-12-17T08:53:02.437000+01:00https://community.sap.com/t5/enterprise-resource-planning-blog-posts-by-members/getting-started-with-sap-snc-for-rfc-integrations/ba-p/13983462Getting Started with SAP SNC for RFC integrations2025-01-12T17:20:02.514000+01:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<P><SPAN>Dear community,</SPAN></P><P><SPAN>Many of you still rely heavily on the legacy SAP interface RFC. In my world that often means customers connecting their third-party services to SAP backends (AS ABAP). Securing a protocol such as SAP Remote Function Call (RFC) requires network layer protection.</SPAN></P><P><SPAN>Often Kerberos is discussed on this topic, because it allows the mapping of Windows-Known identities to SAP backend users. However, <STRONG>this post is about apps and technical connections using X.509 certs</STRONG> – not people. They complain less – and boringly but reliably behave the same way once configured properly</SPAN><span class="lia-unicode-emoji" title=":winking_face:">😉</span><SPAN> Meet <STRONG>SAP Secure Network Communications</STRONG> (SNC).</SPAN></P><P><EM><SPAN>By the way: In case you want user-based flows and focus on SAP Principal Propagation have a look at <A href="https://community.sap.com/t5/technology-blogs-by-members/principal-propagation-in-a-multi-cloud-solution-between-microsoft-azure-and/ba-p/13561150" target="_blank">this series</A> by my beloved colleague <A href="https://community.sap.com/t5/user/viewprofilepage/user-id/171519" target="_blank">Martin Raepple</A>.</SPAN></EM></P><P> </P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="SAP SNC integration architecture overview" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/210985i9E08478E04A64031/image-size/large?v=v2&px=999" role="button" title="Picture1.png" alt="SAP SNC integration architecture overview" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">SAP SNC integration architecture overview</span></span></P><P> </P><H2 id="toc-hId-1079366398"><SPAN>Welcome to the world of <A href="https://help.sap.com/docs/SAP_NETWEAVER_AS_ABAP_751_IP/e73bba71770e4c0ca5fb2a3c17e8e229/e656f466e99a11d1a5b00000e835363f.html" target="_blank" rel="noopener noreferrer">SAP Secure Network Communication</A>s (SNC) for trustworthy technical connections!</SPAN></H2><P><SPAN>In light of zero-trust efforts customers want to secure their technical connections to SAP RFCs too. In that space certificate-based authentication mechanisms are king. SNC is a prominent choice.</SPAN></P><P><SPAN>There are libraries for languages like <A href="https://support.sap.com/en/product/connectors/jco.html" target="_blank" rel="noopener noreferrer">Java</A>, <A href="https://support.sap.com/en/product/connectors/msnet.html" target="_blank" rel="noopener noreferrer">DotNet</A>, <A href="https://support.sap.com/en/product/connectors/nwrfcsdk.html" target="_blank" rel="noopener noreferrer">C/C++</A>, <A href="https://github.com/SAP-archive/PyRFC" target="_blank" rel="noopener nofollow noreferrer">Python</A>, and <A href="https://github.com/SAP-archive/node-rfc" target="_blank" rel="noopener nofollow noreferrer">NodeJS</A> that support SNC for RFC. Python and NodeJS were recently archived and will no longer be maintained. In case you get stuck, consider <A href="https://blogs.sap.com/2023/05/17/generate-soap-services-for-your-legacy-rfcs-to-simplify-integration-out-of-the-box/" target="_blank" rel="noopener noreferrer">generating SOAP services for your SAP RFCs</A> to uplevel the communication stack to layer 7 for use with TLS instead.</SPAN></P><P class="lia-align-center" style="text-align: center;"><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MartinPankraz_1-1736697403542.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/210981iC0A2D3111564937D/image-size/medium?v=v2&px=400" role="button" title="MartinPankraz_1-1736697403542.png" alt="MartinPankraz_1-1736697403542.png" /></span></P><P class="lia-align-center" style="text-align: center;"><SPAN>Source: <A href="https://help.sap.com/docs/SAP_NETWEAVER_AS_ABAP_751_IP/e73bba71770e4c0ca5fb2a3c17e8e229/3f3dacb1c27344e29f3c7b5864825eb5.html" target="_blank" rel="noopener noreferrer">SAP Help</A></SPAN></P><P><SPAN>Below I will show a simple setup with self-signed certificates. This way you can get started with a working setup and elevate towards more sophisticated as you go. Troubleshooting </SPAN><SPAN>SNC errors can be cumbersome, so starting small with less variables and less room for error is a good idea.</SPAN></P><P> </P><TABLE border="1" width="100%"><TBODY><TR><TD width="100%">Be aware of latest crypto library guidance (SAPCryptoLib vs, CommonCryptoLib) published by <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/2716">@JoeGoerlich</a> in <A href="https://community.sap.com/t5/technology-blogs-by-members/commoncryptolib-snc-protocol-versions-and-cipher-suites/ba-p/13518307" target="_blank">this post</A>. Verify your <SPAN>archive name starts with SAPCRYPTOLIB_*.sar (which refers to CCL 8.x).</SPAN></TD></TR></TBODY></TABLE><P> </P><H2 id="toc-hId-882852893"><SPAN>First things first: reach your private RFC interface</SPAN></H2><P><SPAN>SAP products like the SAP Cloud Connector support apps (and people) on the SAP Business Technology Platform to connect to private instances of AS ABAP systems (behind firewall, in RISE, on-premises, or on a protected hyperscaler environment) and bring the required RFC execution environment.</SPAN></P><P><SPAN>Third-party apps must overcome the same challenges. Typically, that means you will be provided with a piece of software to act as reverse invoke proxy (same as the SAP Cloud Connector) besides the “line of sight” through connected private networks from that proxy. See step 0 in the overview drawing for reference.</SPAN></P><P><SPAN>It establishes connection to your third-party app inside out, so that no inbound firewall rules or the likes need to be touched.</SPAN></P><P><SPAN>For instance, Microsoft apps like <A href="https://www.microsoft.com/download/details.aspx?id=39717" target="_blank" rel="noopener nofollow noreferrer">Azure Data Factory, Azure Synapse</A>, <A href="https://www.microsoft.com/download/details.aspx?id=105539" target="_blank" rel="noopener nofollow noreferrer">Microsoft Purview</A>, Microsoft Fabric, and <A href="https://learn.microsoft.com/power-bi/connect-data/service-gateway-onprem" target="_blank" rel="noopener nofollow noreferrer">Microsoft Power BI</A> have dedicated means to connect. These components are called Self-hosted Integration Runtime (SHIR) or On-Premises Data Gateway. Find the downloads on the individual product pages.</SPAN></P><P><SPAN>Be aware that services like Azure Functions or <A href="https://learn.microsoft.com/azure/logic-apps/connectors/sap?tabs=consumption#enable-secure-network-communications-snc" target="_blank" rel="noopener nofollow noreferrer">Azure LogicApps</A> have a second approach beyond the Microsoft On-premises Data Gateway. They can bring the means to execute RFC calls, provide SNC configuration, and create line-of-sight to the <A href="https://learn.microsoft.com/azure/logic-apps/connectors/sap?tabs=consumption#network-connectivity-prerequisites" target="_blank" rel="noopener nofollow noreferrer">private network through injection</A> capability in a single deployment. This way you don't need the reverse invoke proxy.</SPAN></P><P><SPAN>Each of the described solutions have individual guides on the SAP RFC setup and how to expose the configuration for SAP SNC.</SPAN></P><P><EM><SPAN>Can highly recommend my colleague </SPAN></EM><SPAN><A href="https://taylorbrazelton.com/2024/02/26/2024-02-23-setting-up-snc-between-power-apps-automate-and-sap/" target="_blank" rel="noopener nofollow noreferrer"><EM>Taylor Brazelton’s blog</EM></A><EM> for SNC from Power Platform and On-premises Data Gateway.</EM></SPAN></P><P><SPAN>Find below an SAP SNC config sequence with self-signed certificates generated by OpenSSL. Through this setup AS ABAP accepts requests protected by SNC via the SHIR.</SPAN></P><P><SPAN>I assume you have already installed the SHIR on a suitable windows machine and taken care of <A href="https://learn.microsoft.com/purview/register-scan-sapecc-source#prerequisites" target="_blank" rel="noopener nofollow noreferrer">required installations</A> like SAP Java Connector (JCo), SAP Connector for Microsoft .NET (NCo), and .NET Framework. My samples and script commands are Windows specific. However, Linux works the same way with slightly different commands.</SPAN></P><P> </P><H2 id="toc-hId-686339388"><SPAN>Download SAP SNC Crypto Lib to your SNC client machine</SPAN></H2><UL><LI><SPAN>Search the latest “SAPCRYPTOLIB” on SAP’s <A href="https://me.sap.com/softwarecenterviewer/67838200100200022586/MAINT" target="_blank" rel="noopener noreferrer">software center</A> (S-User with download rights required)</SPAN></LI><LI><SPAN>And extract the SAR file using <A href="https://me.sap.com/softwarecenterviewer/01200615320100002542/MAINT" target="_blank" rel="noopener noreferrer">SAPCAR</A>. Command looks something like this:</SPAN></LI></UL><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>.\SAPCAR_1200-70007719.EXE -xvf .\SAPCRYPTOLIBP_8553-20011729.SAR -R .\..\libs\sapcryptolib</code></pre><P> </P><P> </P><UL><LI><SPAN>Find the executable sapgenpse</SPAN></LI></UL><H2 id="toc-hId-489825883"> </H2><H2 id="toc-hId-293312378"><SPAN>Prepare your SNC client machine</SPAN></H2><UL><LI><SPAN>Create a folder to hold your SAP PSE artifacts:</SPAN></LI></UL><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>mkdir sapsecudir
cd .\sapsecudir</code></pre><P> </P><P> </P><UL><LI><SPAN>Permanently add environment variable to point at this folder</SPAN></LI></UL><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>[Environment]::SetEnvironmentVariable("SECUDIR", "C:\sapsecudir", "Machine") # Sets the variable permentaly on the system.
$env:SECUDIR = "C:\sapsecudir" # Updates the current powershell session as there currently does not exist a function to reload.</code></pre><P> </P><P> </P><P> </P><H2 id="toc-hId-96798873"><SPAN>Generate a certificate for your SNC client app</SPAN></H2><UL><LI><SPAN>Create folders to hold your certificates: mkdir rootCA sncCert</SPAN></LI><LI><SPAN>Generate root CA certificate: Adjust the subject as needed</SPAN></LI></UL><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>openssl genpkey -algorithm RSA -out rootCA/ca.key.pem -pkeyopt rsa_keygen_bits:2048
openssl req -x509 -new -key rootCA/ca.key.pem -days 7305 -sha256 -extensions v3_ca -out rootCA/ca.cert.pem -subj "/O=Contoso/CN=Root CA"</code></pre><P> </P><P> </P><UL><LI><SPAN>Generate SNC client certificate and adjust subject as needed:</SPAN></LI></UL><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>openssl genrsa -out sncCert/snc.key.pem 2048
openssl req -key sncCert/snc.key.pem -new -sha256 -out sncCert/snc.csr.pem -subj "/O=Contoso/CN=SNC"</code></pre><P> </P><P> </P><UL><LI><SPAN>Sign the SNC certificate with the root CA certificate:</SPAN></LI></UL><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>openssl x509 -req -in sncCert/snc.csr.pem -days 3650 -CA rootCA/ca.cert.pem -CAkey rootCA/ca.key.pem -CAcreateserial -out sncCert/snc.cert.pem</code></pre><P> </P><P> </P><P> </P><H2 id="toc-hId--99714632"><SPAN>Establish trust between SNC client and SAP</SPAN></H2><UL><LI><SPAN>Add the SNC cert to a PKCS #12 archive file (.p12)</SPAN></LI></UL><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>openssl pkcs12 -export -out snc.p12 -inkey sncCert\snc.key.pem -in sncCert\snc.cert.pem -certfile rootCA\ca.cert.pem</code></pre><P> </P><P> </P><UL><LI><SPAN>Create the SAP Personal Security Environment (PSE) using the container</SPAN></LI></UL><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>.\sapgenpse.exe import_p12 -p SAPSNCSKERB.pse C:\Users\shir-admin\Documents\snc.p12</code></pre><P> </P><P> </P><P> </P><H3 id="toc-hId--167145418"><SPAN>Verify SAP is configured for SNC yet</SPAN></H3><P><SPAN>One way of doing that is using transaction RZ10 and browsing the parameters prefixed with SNC. See <A href="https://help.sap.com/docs/SAP_SINGLE_SIGN-ON/df185fd53bb645b1bd99284ee4e4a750/06298bf7ec7e4ae19fba6ab0c518dda1.html" target="_blank" rel="noopener noreferrer">this SAP document</A> on the required “SNC Parameters for X.509 Configuration” settings and their implications.</SPAN></P><P><SPAN>If there is no configuration yet execute the transaction SNCWIZARD and maintain settings for X.509 credentials. Take note of the SNC private key subject. The CN will be required later.</SPAN></P><P><SPAN>Add your SNC client (I named mine PRV for Microsoft Purview) to the SAP Access Control List (ACL) using transaction SNC0 and allow RFC and CPIC connections.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_2-1736697403544.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/210979iBF1D0B87863E6169/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_2-1736697403544.png" alt="MartinPankraz_2-1736697403544.png" /></span></P><H3 id="toc-hId--363658923"> </H3><H3 id="toc-hId--560172428"><SPAN>Import SNC client cert into SAP</SPAN></H3><UL><LI><SPAN>Use transaction STRUST</SPAN></LI><LI><SPAN>Navigate to the instance below SNC SAPCryptolib (if crossed out with a red X, create one from right-click)</SPAN></LI><LI><SPAN>Scroll down below the certificate list pane, choose import certificate and supply your snc.cert.pem file.</SPAN></LI><LI><SPAN>Click “Add to Certificate List” button</SPAN></LI><LI><SPAN>Click “Save”.</SPAN></LI></UL><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_3-1736697403552.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/210982i4D5DAC894F2F5F39/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_3-1736697403552.png" alt="MartinPankraz_3-1736697403552.png" /></span></P><P> </P><H3 id="toc-hId--831917302"><SPAN>Download SAP cert and import into SNC client PSE</SPAN></H3><UL><LI><SPAN>From the same STRUST screen, double click the Subject line of “Own Certificate” and</SPAN></LI><LI><SPAN>Scroll down again to find the “Export Certificate” button at the bottom.</SPAN></LI><LI><SPAN>Move to your SNC client machine (where your SHIR runs), put the certificate in a secure place (in my sample it landed in a folder called sap) and run below command to import it into your PSE.</SPAN></LI></UL><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>sapgenpse.exe maintain_pk -p SAPSNCSKERB.pse -v -a C:\sap\contoso-public-key.crt</code></pre><P> </P><P> </P><P><SPAN>Now your SAP trusts connections coming from your SHIR.</SPAN></P><P> </P><H2 id="toc-hId--735027800"><SPAN>Allow your SHIR process to use your SAP PSE</SPAN></H2><UL><LI><SPAN>Verify which user or service is being used by your SNC client to obtain certificate to communicate with SAP. The Purview SHIR uses the service user “NT SERVICE\DIAHostService”.</SPAN></LI><LI><SPAN>Add a credential to allow the certificate retrieval request from the PSE.</SPAN></LI></UL><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>.\sapgenpse.exe seclogin -p C:\sapsecudir\SAPSNCSKERB.pse -x your-pse-pin -O "NT SERVICE\DIAHostService"</code></pre><P> </P><P> </P><P><SPAN>Verify credentials like so</SPAN></P><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>.\sapgenpse.exe seclogin -l -O "NT SERVICE\DIAHostService"</code></pre><P> </P><P> </P><P><SPAN>You can delete them like this:</SPAN></P><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>.\sapgenpse.exe seclogin -d -O " NT SERVICE\DIAHostService "</code></pre><P> </P><P> </P><P><SPAN>Use the <STRONG>-h parameter to get help</STRONG> with the sapgenpse command line tool or check the command reference <A href="https://help.sap.com/docs/SAP_NETWEAVER_750/e73bba71770e4c0ca5fb2a3c17e8e229/0d9ce63bab134b39a52e340255d7650c.html" target="_blank" rel="noopener noreferrer">here</A>.</SPAN></P><P> </P><H1 id="toc-hId--638138298"><SPAN>Test communication using SAP SNC</SPAN></H1><P><SPAN>Navigate to your client application and supply the SNC configuration you have prepared. Some apps require an SAP user and password in addition even though providing a client certificate would be enough for a technical connection (remember: no user mapping or SSO).</SPAN></P><P><EM><SPAN>This gives you the option to further trim down access. Use transaction SU01 and the SNC tab or the maintenance view “VUSREXTID” from transaction SM30 to configure the SNC external ID (CN) to your SAP user name.</SPAN></EM></P><P><SPAN>See below sample taken from the connection configuration fly-out pane on the Azure portal UI. It can be applied, however, to any SNC client configuration. See further samples <A href="https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/ce/1dfd3d4aefd95ee10000000a114084/content.htm" target="_blank" rel="noopener noreferrer">here</A> and <A href="https://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01703.0222/doc/html/fre1292886445861.html" target="_blank" rel="noopener nofollow noreferrer">here</A>.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MartinPankraz_4-1736697403557.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/210983iBFAF35BE9B7B3379/image-size/medium?v=v2&px=400" role="button" title="MartinPankraz_4-1736697403557.png" alt="MartinPankraz_4-1736697403557.png" /></span></P><P> </P><P><SPAN>Trigger “Test connection” and marvel at the SNC secured communication test from Microsoft Purview to AS ABAP</SPAN><span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:">😊</span></P><P><SPAN>Or go even a step further and call your first RFC. RFC_PING or STFC_CONNECTION might be a suitable one in case your target is not yet operational or not identified yet.</SPAN></P><P> </P><H1 id="toc-hId--834651803"><SPAN>Hints on Troubleshooting</SPAN></H1><UL><LI><SPAN>First, try to connect from your client to AS ABAP without SNC to ensure that networking is properly configured already. Be aware of <A href="https://help.sap.com/docs/Security/575a9f0e56f34c6e8138439eefc32b16/616a3c0b1cc748238de9c0341b15c63c.html" target="_blank" rel="noopener noreferrer">SAP RFC ports</A> (ZZ placeholder represents your SAP instance number, e.g. 00 or 01 often) and check firewall accordingly if needed.</SPAN><UL><LI><SPAN>32ZZ and 33ZZ for direct RFC connections</SPAN></LI><LI><SPAN>48ZZ for SNC secured RFC connections</SPAN></LI></UL></LI><LI><SPAN>Verify SNC status from transaction SM51 -> click “SNC Status” button to ensure it is fully configured</SPAN></LI><LI><SPAN>Consult the <A href="https://community.sap.com/t5/application-development-blog-posts/report-zsm04000-snc-zrsusr000-620-show-snc-status-of-current-user-sessions/ba-p/13027982" target="_blank">blog series</A> from @<A href="https://community.sap.com/t5/user/viewprofilepage/user-id/360" target="_blank">Frank_Buchholz</A> on more sophisticated approaches to verify individual SNC connections. For instance, report “<A href="https://github.com/SAP-samples/security-services-tools" target="_blank" rel="noopener nofollow noreferrer">ZSM04000_SNC</A>” shows more details.</SPAN></LI><LI><SPAN>For those of you using <A href="https://help.sap.com/docs/SAP_NETWEAVER_750/1ca554ffe75a4d44a7bb882b5454236f/ab35e1c69f744d69a4fcf4ca93284e0c.html" target="_blank" rel="noopener noreferrer">SAP UCON</A> may consult the SNC connectivity status there.</SPAN></LI><LI><SPAN>Closing above mentioned RFC ports (32ZZ, 33ZZ) on the proxy VM firewall does the trick to verify if SNC connection is opened. Intentionally “breaking” your SNC config by mistyping the SNC partner name for instance could give you another indication on a functional setup.</SPAN></LI></UL><P> </P><H1 id="toc-hId--1031165308"><SPAN>Final Words</SPAN></H1><P><SPAN>That’s a wrap </SPAN><span class="lia-unicode-emoji" title=":burrito:">🌯</span><SPAN>. You learned today how to secure your technical RFC connections from third party apps to AS ABAP systems using SNC. The guide keeps it simple so you can establish a stable setup base from which to iterate on more complex setups confidently </SPAN><span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:">😊</span><SPAN>Generate SOAP services for your RFCs and use TLS in case SNC is not an option.</SPAN></P><P><SPAN>By the way: When introducing an API Management solution between your 3rd party app and the SOAP service on AS ABAP you may use OAuth2, or OpenID Connect on the client. You still need to translate on the API Management layer to an auth mechanism that <A href="https://help.sap.com/docs/SAP_NETWEAVER_750/f7dd32926c1c4fcf889a4303d833a22b/cf507f42805444f3ad1caf430ca4a221.html" target="_blank" rel="noopener noreferrer">AS ABAP supports</A>. Either way a step forward in securing your SAP connections.</SPAN></P><P><SPAN>Happy integrating with SAP!</SPAN></P><P><SPAN>#Kudos again to <A href="https://www.linkedin.com/in/savas-akgol-713b3915/" target="_self" rel="nofollow noopener noreferrer">Savas Akgol</A>, <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/171519">@MartinRaepple</a>, and <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/360">@Frank_Buchholz</a> for helping with some of the hard parts <span class="lia-unicode-emoji" title=":folded_hands:">🙏</span></SPAN></P><P><SPAN> </SPAN></P><P><SPAN>Cheers</SPAN></P><P><SPAN>Martin</SPAN></P>2025-01-12T17:20:02.514000+01:00https://community.sap.com/t5/technology-blog-posts-by-sap/sap-private-link-service-use-cases-for-sap-cloud-integration-and-sap-build/bc-p/14001669#M178700Re: SAP Private Link service use cases for SAP Cloud Integration and SAP Build Work Zone, Standard E2025-01-30T13:33:46.793000+01:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<P>Hey <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1431637">@MMZ</a>,</P><P>BTP endpoints including SAP Cloud Integration are internet-facing by design - like any other SaaS product out there. No way to make that private. SaaS security is about securing app layer not network.</P><P>Depending on your scenario you might consider using a timer trigger on your iflow to avoid having an endpoint outside.</P><P>KR Martin</P>2025-01-30T13:33:46.793000+01:00https://community.sap.com/t5/enterprise-resource-planning-blog-posts-by-members/getting-started-with-sap-snc-for-rfc-integrations/bc-p/14012735#M70969Re: Getting Started with SAP SNC for RFC integrations2025-02-10T13:39:34.046000+01:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<P>Thank you so much for sharing <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/2716">@JoeGoerlich</a>! Will make a note on the post. </P><P>KR Martin</P>2025-02-10T13:39:34.046000+01:00https://community.sap.com/t5/technology-blog-posts-by-members/sap-private-linky-swear-with-azure-running-cloud-connector-and-sap-private/bc-p/14035900#M172230Re: SAP Private linky swear with Azure – running Cloud Connector and SAP Private Link side-by-side2025-03-06T15:45:42.547000+01:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<P><a href="https://community.sap.com/t5/user/viewprofilepage/user-id/47313">@saurabhkumbhare</a> scenario 1.5 is about enabling the Cloud Connector relay connection to be established via Private Link rather than outbound Internet.</P><P>CPI to ECC is a different scenario and already covered <A href="https://community.sap.com/t5/technology-blogs-by-sap/sap-private-link-service-use-cases-for-sap-cloud-integration-and-sap-build/ba-p/13542464" target="_blank">here</A>.</P><P>KR Martin</P>2025-03-06T15:45:42.547000+01:00https://community.sap.com/t5/technology-blog-posts-by-sap/sap-private-link-service-use-cases-for-sap-cloud-integration-and-sap-build/bc-p/14062161#M180308Re: SAP Private Link service use cases for SAP Cloud Integration and SAP Build Work Zone, Standard E2025-03-31T16:23:42.443000+02:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<P><a href="https://community.sap.com/t5/user/viewprofilepage/user-id/607904">@stag_pune</a> SAP BTP is a Internet-facing app by design. SAP Private Link is the only option for hyperscaler specific private networking options by the platform uni-directional from BTP. Some individual SAP SaaS apps implemented further options for VPN or ExpressRoute without BTP as a platform. As it stands today you need to <A href="https://influence.sap.com/" target="_blank" rel="noopener noreferrer">file a feature request to SAP</A> to request further private networking features.</P>2025-03-31T16:23:42.443000+02:00https://community.sap.com/t5/technology-blog-posts-by-members/sap-principal-propagation-without-secrets-how-managed-identity-in-apim/ba-p/14091769SAP Principal Propagation without Secrets: How Managed Identity in APIM Simplifies Everything2025-05-02T11:01:42.574000+02:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<P><SPAN>Dear community,</SPAN></P><P><SPAN>SAP Principal Propagation (for simplicity often also referred to as SSO) is the gold standard for app integration – especially when it comes to 3rd party apps such as Microsoft Power Platform. Building on top of <A href="https://community.powerplatform.com/blogs/post/?postid=c6a609ab-3556-ef11-a317-6045bda95bf0" target="_blank" rel="noopener nofollow noreferrer">my prior blog</A> on API Management usage for SAP SSO, I am sharing today how you can fully <STRONG>eliminate the passwords or certificates for the token exchange</STRONG> previously required.</SPAN></P><P><FONT face="courier new,courier"><STRONG>No more password storing or rotation. No certificates to renew. No manual key rollover scripts.</STRONG></FONT></P><P><SPAN>Thank god!</SPAN></P><P><SPAN>The Microsoft Entra ID authentication handshakes with services such as SAP BTP, SuccessFactors, Azure, or M365 apps like Power Platform allows these apps to become native, dynamic, and <STRONG>self-maintaining</STRONG>.</SPAN></P><P><SPAN>This shift not only tightens security by reducing the attack surface but also significantly accelerates project delivery, improves compliance with modern Zero Trust principles, and cuts down on administrative overhead. It’s a <STRONG>small architectural change with a big real-world impact</STRONG> — and a logical next step for enterprise-grade app integrations in the SAP ecosystem.</SPAN></P><P> </P><H1 id="toc-hId-1580991830"><SPAN>A glimpse under the hood</SPAN></H1><P><SPAN>The magic? It’s called <A href="https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview#use-managed-identity-as-a-federated-identity-credential-fic-on-an-entra-id-app" target="_blank" rel="noopener nofollow noreferrer">Managed Identity</A> for Azure. With a user-assigned managed identity in API Management, the platform takes care of the authentication for you — clean, automatic, and secret-free. Building on top of <A href="https://learn.microsoft.com/entra/workload-id/workload-identity-federation-config-app-trust-managed-identity?tabs=microsoft-entra-admin-center" target="_blank" rel="noopener nofollow noreferrer">Workload Identity Federation</A> enables using a managed identity as a credential, just like certificate or password, on Entra ID Applications.</SPAN></P><P><SPAN>See following updated flow diagram from the prior blog. It highlights with red and yellow arrows where it was possible to “eliminate” credentials.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MartinPankraz_0-1746174903862.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257026iDC03090A954A1500/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_0-1746174903862.png" alt="MartinPankraz_0-1746174903862.png" /></span></P><P><SPAN>When browsing Microsoft Learn or additional blogs, look for the technical term “Federated Identity Credential” for additional details.</SPAN></P><P><SPAN>Solving this challenge on Azure API Management level enables scaling the approach to arbitrary many different consumer solutions.</SPAN></P><P>Find the updated policy on the Azure API Management repos for SAP ECC and S/4HANA <SPAN><A href="https://github.com/Azure/api-management-policy-snippets/blob/master/examples/Request%20OAuth2%20access%20token%20from%20SAP%20using%20AAD%20JWT%20token.xml" target="_blank" rel="noopener nofollow noreferrer">here</A></SPAN> and for SuccessFactors <SPAN><A href="https://github.com/Azure/api-management-policy-snippets/blob/master/examples/Request%20OAuth2%20access%20token%20from%20SuccessFactors%20using%20AAD%20JWT%20token.xml" target="_blank" rel="noopener nofollow noreferrer">here</A></SPAN>.</P><P><SPAN>Learn more about this space in general from the <A href="https://community.sap.com/t5/technology-blogs-by-members/principal-propagation-in-a-multi-cloud-solution-between-microsoft-azure-and/ba-p/13482071" target="_blank">blog series</A> by my magnificent colleague <A href="https://community.sap.com/t5/user/viewprofilepage/user-id/171519" target="_blank">Martin Raepple</A>.</SPAN></P><P> </P><H2 id="toc-hId-1513561044"><SPAN>Create a user-assigned managed identity for your Azure API Management instance</SPAN></H2><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MartinPankraz_1-1746174903874.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257027i368AD4324CA6A896/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_1-1746174903874.png" alt="MartinPankraz_1-1746174903874.png" /></span></P><P> </P><P><SPAN>See additional details on <A href="https://learn.microsoft.com/azure/api-management/api-management-howto-use-managed-service-identity#create-a-user-assigned-managed-identity" target="_blank" rel="noopener nofollow noreferrer">this Microsoft Learn article</A>.</SPAN></P><P> </P><H2 id="toc-hId-1317047539"><SPAN>Create a “managed credential”</SPAN></H2><P><SPAN>This step is being referred to by <A href="https://learn.microsoft.com/entra/workload-id/workload-identity-federation-config-app-trust-managed-identity?tabs=microsoft-entra-admin-center#configure-a-federated-identity-credential-on-an-application" target="_blank" rel="noopener nofollow noreferrer">Microsoft Learn</A> as Federated Identity Credential (FIC).</SPAN></P><UL><LI><SPAN>Click Add Credential as per below screenshot from the manage secrets pane of your Entra ID app registration which represents your API Management instance.</SPAN></LI><LI><SPAN>Choose scenario “Managed Identity”,</SPAN></LI><LI><SPAN>Select the id of your user-assigned-managed identity created before, and</SPAN></LI><LI><SPAN>Make sure the audience is listed as “api://AzureADTokenExchange”.</SPAN></LI></UL><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MartinPankraz_2-1746174903901.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257028i5DDBDFF9AA0EA9BF/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_2-1746174903901.png" alt="MartinPankraz_2-1746174903901.png" /></span></P><P> </P><H2 id="toc-hId-1120534034"><SPAN>Import the updated policy</SPAN></H2><P><SPAN>Navigate to your <A href="https://learn.microsoft.com/azure/api-management/sap-api?tabs=odata" target="_blank" rel="noopener nofollow noreferrer">SAP OData API</A> on Azure API Management and use the <A href="https://portal.azure.com/?#browse/Microsoft.ApiManagement%2Fservice" target="_blank" rel="noopener nofollow noreferrer">Azure portal UI</A> to paste <A href="https://github.com/Azure/api-management-policy-snippets/blob/master/examples/Request%20OAuth2%20access%20token%20from%20SAP%20using%20AAD%20JWT%20token.xml" target="_blank" rel="noopener nofollow noreferrer">the policy</A> as code, or leverage infrastructure-as-code with your devops pipeline to apply SAP Principal Propagation at scale. See this <A href="https://github.com/Azure-Samples/app-service-javascript-sap-cloud-sdk-quickstart" target="_blank" rel="noopener nofollow noreferrer">Azure Developer CLI sample</A> using Bicep for reference.</SPAN></P><P><SPAN>See the <A href="https://github.com/Azure/api-management-policy-snippets/blob/master/examples/Request%20OAuth2%20access%20token%20from%20SAP%20using%20AAD%20JWT%20token.xml" target="_blank" rel="noopener nofollow noreferrer">APIM policy line</A> doing the magical <A href="https://learn.microsoft.com/azure/api-management/authentication-managed-identity-policy#use-managed-identity-and-set-header-manually" target="_blank" rel="noopener nofollow noreferrer">managed identity request</A>. It is as simple as that:</SPAN></P><pre class="lia-code-sample language-markup"><code><authentication-managed-identity resource="api://azureadtokenexchange" client-id="{{APIMUserAssignedManagedIdentityId}}" output-token-variable-name="msi-access-token" ignore-error="false" /></code></pre><P><SPAN>The rest happens under the hood.</SPAN></P><P><EM><SPAN>Learn more about policy creation including Microsoft Copilot usage from </SPAN></EM><SPAN><A href="https://learn.microsoft.com/azure/api-management/api-management-howto-policies#get-assistance-creating-policies-using-microsoft-copilot-in-azure-preview" target="_blank" rel="noopener nofollow noreferrer"><EM>this article</EM></A><EM> and </EM><A href="https://www.youtube.com/watch?v=N9Sp7iPjIDs" target="_blank" rel="noopener nofollow noreferrer"><EM>this video</EM></A><EM>. In case you fancy GitHub Copilot apply the VS Code extension. See </EM><A href="https://techcommunity.microsoft.com/t5/apps-on-azure-blog/github-copilot-for-azure-api-management-policies/ba-p/3884229" target="_blank" rel="noopener nofollow noreferrer"><EM>this community post</EM></A><EM> for further inspiration.</EM></SPAN></P><P><EM><SPAN>Consider the governance and security trade-offs between mighty policies and SAP OAuth clients authorized for everything vs. a multitude of clients for each API and scope.</SPAN></EM></P><P> </P><H2 id="toc-hId-924020529"><SPAN>Configure the policy using named values</SPAN></H2><P><SPAN>The configuration exercise is 99% the same as outlined in the earlier blog “</SPAN><SPAN><A href="https://community.powerplatform.com/blogs/post/?postid=c6a609ab-3556-ef11-a317-6045bda95bf0" target="_blank" rel="noopener nofollow noreferrer">SAP OData connector now supports OAuth2 and SAP Principal Propagation</A>” before</SPAN><SPAN>. However, now we replace the client secret setting for the Entra ID app registration that represents your API Management instance with the client id of your <A href="https://learn.microsoft.com/azure/api-management/api-management-howto-use-managed-service-identity#create-a-user-assigned-managed-identity" target="_blank" rel="noopener nofollow noreferrer">user-assigned managed identity</A>.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MartinPankraz_3-1746174903908.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257029iE21138B47F2B5949/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_3-1746174903908.png" alt="MartinPankraz_3-1746174903908.png" /></span></P><P> </P><P><SPAN>Fill the values as per your environment:</SPAN></P><TABLE><TBODY><TR><TD width="200"><P><STRONG><SPAN>Key</SPAN></STRONG></P></TD><TD width="200"><P><STRONG><SPAN>Value sample</SPAN></STRONG></P></TD><TD width="200"><P><STRONG><SPAN>Hints</SPAN></STRONG></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>AADTenantId</SPAN></STRONG></P></TD><TD width="200"><P><SPAN>12a345bc-1234-56ab-78ab-zzzzzzzzz</SPAN></P></TD><TD width="200"><P><SPAN>Find it on the Azure portal (e.g. <A href="https://portal.azure.com/?feature.customportal=false#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/Overview" target="_blank" rel="noopener nofollow noreferrer">here</A>)</SPAN></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>APIMAADRegisteredAppClientId</SPAN></STRONG></P></TD><TD width="200"><P><SPAN>999abce-7777-abcd-a6c9-zzzzzzzzzzz</SPAN></P></TD><TD width="200"><P><SPAN>The Application (client) id of the Entra ID app registration representing your Azure API Management instance.</SPAN></P></TD></TR><TR><TD width="200"><P><STRONG>APIMUserAssignedManagedIdentityId</STRONG></P></TD><TD width="200"><P><SPAN>7777abce-7777-abcd-a6c9-zzzzzzzzzzz</SPAN></P></TD><TD width="200"><P><SPAN>Client ID of user-assigned managed identity of APIM instance</SPAN></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>AADSAPResource</SPAN></STRONG></P></TD><TD width="200"><P><SPAN><A href="https://a4h100" target="_blank" rel="noopener nofollow noreferrer">https://a4h100</A></SPAN></P></TD><TD width="200"><P><SPAN>The provider’s name from your NetWeaver SAML setup. Typically, a URL with <A href="https://SID" target="_blank" rel="noopener nofollow noreferrer">SID</A> followed Client number</SPAN></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>sap-oauth-client-username</SPAN></STRONG></P></TD><TD width="200"><P><SPAN>ODATAOAUTH</SPAN></P></TD><TD width="200"><P><SPAN>User name provided on SOAUTH2 transaction (/sap/bc/webdynpro/sap/oauth2_config?sap-client=100)</SPAN></P><P><SPAN> </SPAN></P><P><SPAN>Create a named user on SU01 with minimum rights (S_SCOPE, S_SERVICE) and reference that on SOAUTH2.</SPAN></P><P><SPAN>Don’t forget to assign authorized scope.</SPAN></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>sap-oauth-client-password</SPAN></STRONG></P></TD><TD width="200"><P><SPAN>Password for that oauth user</SPAN></P></TD><TD width="200"><P><SPAN>This is only used to request tokens not to authenticate to SAP.</SPAN></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>sap-oauth-scope</SPAN></STRONG></P></TD><TD width="200"><P><SPAN>ZPRODUCTSVIEW_CDS_0001</SPAN></P></TD><TD width="200"><P><SPAN>The scope assigned on SOAUTH2</SPAN></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>SAPOAuthRefreshExpiry</SPAN></STRONG></P></TD><TD width="200"><P><SPAN>86400</SPAN></P></TD><TD width="200"><P><SPAN>Option to set refresh token expiry (default on SAP 2 years). It is not part of the token response.</SPAN></P></TD></TR><TR><TD width="200"><P><STRONG><SPAN>SAPOAuthServerAdressForTokenEndpoint</SPAN></STRONG></P></TD><TD width="200"><P><SPAN>a4h-internal.cloudapp.net:44301</SPAN></P></TD><TD width="200"><P><SPAN>Host and port of the target SAP OAuth server. When SAP cloud connector is used, put the virtual hostname and port.</SPAN></P></TD></TR></TBODY></TABLE><H1 id="toc-hId-598424305"><SPAN>Hints on troubleshooting</SPAN></H1><P><SPAN>There was good feedback on the <A href="https://github.com/MartinPankraz/AzureSAPODataReader/blob/master/Templates/AAD_APIM_SAP_Principal_Propagation.postman_collection.json" target="_blank" rel="noopener nofollow noreferrer">Postman collection</A> to verify proper SAP Principal Propagation setup. Be aware that the on-behalf-of flow step to request the SAML assertion from Entra involving the managed identity cannot be tested via a REST client from your local device, because only Azure services are trusted for the request.</SPAN></P><P><SPAN>In general, I would recommend testing the auth flow with the least components involved as possible to reduce problem surface. Meaning, test with a REST client of your choice with client secrets to make sure that your SAP SSO setup and OAuth settings are working. Keep the API Management part and managed identity to after successful initial integration with SAP.</SPAN></P><H1 id="toc-hId-401910800"> </H1><H1 id="toc-hId-205397295"><SPAN>The wider integration context</SPAN></H1><P><SPAN>Q: Does Managed Identity for Azure work only for SAP on Azure?</SPAN></P><P><SPAN>A: No, using <A href="https://learn.microsoft.com/azure/api-management/self-hosted-gateway-overview" target="_blank" rel="noopener nofollow noreferrer">Azure API Managment self-hosted Gateway</A> you can bring that capability any-premises. Besides deploying the gateway directly into your local network, consider also Azure public cloud routing options (ExpressRoute, NVAs, VPN, etc.)</SPAN></P><P><SPAN>Q: SAP Cloud Connector already supports Principal Propagation for on-premises. Why would I choose this managed identity approach?</SPAN></P><P><SPAN>A: SAP Integration Suite using SAP Cloud Connector for instance is a prime choice - well established and mature. Nothing wrong with that. Still the credentials need to be managed. You may consider a hybrid where Integration Suite realizes connectivity, while Managed Identity for Azure provides passwordless token requests. Be aware to avoid configuring Principal Propagation twice (OAuth2SAMLBearer flow vs. the Cloud Connector setting with short-lived x.509 certs)</SPAN></P><P> </P><H1 id="toc-hId-8883790"><SPAN>Thoughts on production readiness</SPAN></H1><P><SPAN>Managed Identities are a well-established platform feature on Azure with large scale adoption across services. Furthermore, it is <STRONG>the recommended way</STRONG> of configuring service to service authentication.</SPAN></P><P><SPAN>Credentials remain in place for the SAP OAuth server as per its <A href="https://help.sap.com/docs/SAP_NETWEAVER_750/e815bb97839a4d83be6c4fca48ee5777/de1b14d589fa46b383ec43fd33dace86.html" target="_blank" rel="noopener noreferrer">OAuth2 flow capabilities</A>. Halfway there so to say. Luckily, token users have a much lower risk profile than actual users.</SPAN></P><H1 id="toc-hId--187629715"> </H1><H1 id="toc-hId-385596863"><SPAN>Final Words</SPAN></H1><P><SPAN>That’s a wrap </SPAN><span class="lia-unicode-emoji" title=":burrito:">🌯</span><SPAN>. Today you saw how SAP Principal Propagation goes secret-less on Microsoft Entra ID — no passwords, and no certificates. Entra ID with Managed Identity handles it all, mapping Microsoft identities to SAP users while keeping your authorizations intact.</SPAN></P><P><SPAN>This is what native, secure integration should look like.</SPAN></P><P><span class="lia-unicode-emoji" title=":backhand_index_pointing_right:">👉</span><SPAN><STRONG>If you’re still managing credentials manually in 2025, it’s time for an upgrade. It only gets worse from here: Certificate authorities agreed to <A href="https://www.bleepingcomputer.com/news/security/ssl-tls-certificate-lifespans-reduced-to-47-days-by-2029/" target="_blank" rel="noopener nofollow noreferrer">reduce lifespan to 47 days</A> in stages over the next 1-3 years.</STRONG></SPAN></P><P><SPAN>Cheers </SPAN><SPAN>Martin</SPAN></P>2025-05-02T11:01:42.574000+02:00https://community.sap.com/t5/technology-blog-posts-by-members/sap-leanix-integrating-microsoft-defender-for-cloud-apps/ba-p/14089439SAP LeanIX integrating Microsoft Defender for Cloud Apps2025-05-06T10:33:38.725000+02:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<H2 id="toc-hId-1709386380">When Enterprise Architects and IT Security Speak the Same Language</H2><P><EM>This blog was co-authored by <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1578736">@Michelle10</a> (<A href="https://www.linkedin.com/in/michelle-n-9a2192118/" target="_blank" rel="noopener nofollow noreferrer">PM</A> @ SAP LeanIX)</EM></P><P><SPAN>Dear community,</SPAN></P><P><SPAN>In most enterprises, IT security and enterprise architecture are two critical disciplines, each with their own priorities, tools, and perspectives. One is laser-focused on threat detection, compliance, and access control. The other is mapping capabilities, rationalizing applications, and shaping long-term IT strategy.</SPAN></P><P><SPAN>What happens when these personas complement each other – not just in theory, but in tooling?</SPAN></P><P><SPAN>That’s exactly where the integration between <A href="https://www.leanix.net/" target="_blank" rel="noopener nofollow noreferrer">SAP LeanIX</A> and <A href="https://learn.microsoft.com/defender-cloud-apps/what-is-defender-for-cloud-apps" target="_blank" rel="noopener nofollow noreferrer">Microsoft Defender for Cloud Apps</A> comes in.</SPAN></P><P><SPAN>But wait, what about my managed apps governed by my corporate identity provider? No worries, SAP LeanIX may be integrated with <A href="http://aka.ms/entraSAPHub" target="_blank" rel="noopener nofollow noreferrer">Microsoft Entra ID</A> for discovery and keeping track which apps have SSO etc. as well.</SPAN></P><P> </P><H1 id="toc-hId-1383790156"><SPAN>Connecting Two Worlds</SPAN></H1><P><SPAN>Microsoft Defender for Cloud Apps is your frontline for SaaS security and governance to detect threat attacks that arise from your SaaS app interactions and reduce the exposure to such attacks. Furthermore, it helps security teams uncover shadow IT, assess risk, and monitor data flows across </SPAN></P><P><SPAN>SAP LeanIX, meanwhile, gives enterprise architects the visibility they need to manage complexity – mapping applications to business capabilities, tracking lifecycle data, and supporting IT transformation.</SPAN></P><P><SPAN>The magic happens when you combine them.</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MartinPankraz_0-1745927891074.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/256071iFE69DF396D5D9AAC/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_0-1745927891074.png" alt="MartinPankraz_0-1745927891074.png" /></span></P><P> </P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MartinPankraz_1-1745927891133.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/256073iD396C1026D652602/image-size/large?v=v2&px=999" role="button" title="MartinPankraz_1-1745927891133.png" alt="MartinPankraz_1-1745927891133.png" /></span></P><P> </P><H1 id="toc-hId-1187276651"><SPAN>From Discovery to Decision-Making</SPAN></H1><P><SPAN>With this integration, you can pull application usage and risk data from Defender for Cloud Apps directly into SAP LeanIX. That means:</SPAN></P><P><EM><SPAN>Security teams discover new or risky SaaS apps…</SPAN></EM></P><P><EM><SPAN>…Architects contextualize those apps within business functions and processes.</SPAN></EM></P><P><SPAN> </SPAN><SPAN>You’re no longer just identifying what’s out there - you’re aligning it with your architecture strategy. This turns ad-hoc discovery into intentional governance.</SPAN></P><P> </P><H1 id="toc-hId-990763146"><SPAN>Business Outcomes</SPAN></H1><UL><LI><SPAN>Eliminate shadow IT with traceable business context.</SPAN></LI><LI><SPAN>Support rationalization with usage-driven decisions.</SPAN></LI><LI><SPAN>Align security and strategy with shared data and mutual visibility.</SPAN></LI></UL><P> </P><H1 id="toc-hId-794249641"><SPAN>Why It Matters</SPAN></H1><P><SPAN>This integration fosters collaboration between two personas that often operate in parallel but rarely intersect. With Microsoft Defender for Cloud Apps and SAP LeanIX, they do - bringing security and architecture into a shared conversation around risk, capability, and value.</SPAN></P><P><SPAN>The result? Better decisions, stronger governance, and a much clearer view of your SaaS landscape. All powered from the Defender and Entra ID APIs. Not too bad, huh?</SPAN></P><P><SPAN>This is how modern IT operates: cross-functional, data-driven, and strategically aligned.</SPAN></P><P> </P><H1 id="toc-hId-597736136">Get Started</H1><P>Anyone curious about uncovering shadow IT and making better SaaS app decisions? Just reach out to me and Michelle or leave a comment.</P><P> </P><P>Cheers</P><P>Martin & Michelle</P><P>______________</P><P>References:</P><UL><LI><SPAN><A href="https://learn.microsoft.com/defender-cloud-apps/api-introduction" target="_blank" rel="noopener nofollow noreferrer">Defender for Cloud Apps REST API | Microsoft Learn</A></SPAN></LI><LI><SPAN><A href="https://learn.microsoft.com/graph/api/resources/security-cloudappdiscovery-overview?view=graph-rest-beta&viewFallbackFrom=graph-rest-1.0" target="_blank" rel="noopener nofollow noreferrer">Microsoft Defender for Cloud apps API in Microsoft Graph | Microsoft Learn</A></SPAN></LI><LI><SPAN><A href="https://docs-eam.leanix.net/docs/microsoft-defender-for-cloud-apps" target="_blank" rel="noopener nofollow noreferrer">Microsoft Defender for Cloud Apps (MDCA) Integration for SaaS Discovery | LeanIX User Docs</A></SPAN></LI><LI><SPAN><A href="https://docs-eam.leanix.net/docs/microsoft-entra-id" target="_blank" rel="noopener nofollow noreferrer">Microsoft Entra ID Integration for SaaS Discovery | LeanIX User Docs</A></SPAN></LI></UL>2025-05-06T10:33:38.725000+02:00https://community.sap.com/t5/technology-blog-posts-by-members/sap-principal-propagation-without-secrets-how-managed-identity-in-apim/bc-p/14094417#M173273Re: SAP Principal Propagation without Secrets: How Managed Identity in APIM Simplifies Everything2025-05-06T13:32:27.628000+02:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<P><a href="https://community.sap.com/t5/user/viewprofilepage/user-id/178477">@vbalko-claimate</a> good question. Added a small Q/A section on that.</P>2025-05-06T13:32:27.628000+02:00https://community.sap.com/t5/enterprise-resource-planning-blog-posts-by-members/integrating-low-code-solutions-with-microsoft-using-sap-integration-suite/bc-p/14095347#M71403Re: Integrating low code solutions with Microsoft using SAP Integration Suite has never been easier!2025-05-07T13:15:39.896000+02:00Martin-Pankrazhttps://community.sap.com/t5/user/viewprofilepage/user-id/143781<P><a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1458002">@JorgeCalderon</a> the jwt token from caller is part of the standard Authorization header. The sender in my scenario was the SAP OData connector in PowerAutomate. Cheers Martin</P>2025-05-07T13:15:39.896000+02:00