
SAP and Microsoft have announced their collaboration to modernize identity and access management (IAM) for SAP customers. SAP recommends its SAP Identity Management (IDM) customers transition to Microsoft Entra (formerly known as Microsoft Azure Active Directory) as the SAP IDM solution approaches the end of maintenance by 2027, with extended maintenance until 2030. This blog post series aims to provide technical guidance on how to plan and implement IAM for SAP applications with Microsoft Entra following SAP's reference architecture for Cloud-leading identity lifecycle. Part I (this blog post) looks at a Cloud-only scenario applying a federated approach for cross-domain identity and access management. Part II covers a hybrid setup for user provisioning across on-premise and the Cloud. Stay tuned for new scenarios as part of this series.
This blog post series focuses on key scenarios, starting with the implementation of a workflow-based access management solution to SAP Business Technology Platform (BTP) with Microsoft Entra ID Governance.
📢 📢 📢 Note |
In session XP202, Identity lifecycle management with SAP BTP and Microsoft Entra, at SAP TechEd 2024, @RegineSchimmer and I talk about our collaboration between SAP and Microsoft and show a live demo of the scenario from this blog post. Also check out the recording (in German language only) of my online session from December 5th 2024 with the Deutschsprachige SAP Anwendergruppe e.V. (DSAG), AG Identity Access Management, on a deep-dive and live demo for this scenario. |
Figure 1 illustrates the scenario in more detail:
Figure 1: Access management to BTP with Entra ID Governance
The developer (John Doe) requires access to SAP Business Application Studio which serves as an example for an SAP BTP application in this scenario. To work with SAP Business Application Studio, John's user must be a assigned to the Developer role in the BTP subaccount, which is part of the Business_Application_Studio_Developer role collection that gets automatically created with the subscription to SAP Business Application Studio. Granting the access must be approved by the Entra ID administrator (Jane Smith).
To implement this workflow for managing the access to BTP, the following entities in Entra are required:
If John's request gets approved by Jane and he becomes a member of the Entra ID security group SAP BTP Developer, how is this information securely transferred to SAP BTP? Microsoft Entra ID issues security tokens to successfully authenticated users, such as access tokens, refresh tokens, and ID tokens. Depending on the token type they contain different information, expressed as name-value pairs (also known as claims), that reliably provide facts about the user's identity. Claims can include details like the user's unique ID, email address, the user's department, job title, and other attributes related to the user's role within the organization. To securely transfer John's membership in the SAP BTP Developer group to BTP, Entra can be configured to include John's group memberships as a claim in the ID token. Since different applications usually require different sets of claims in the tokens, customization of the claims is done on an application registration for IAS (SAP Cloud Identity Services Application Registration in figure 1) in the Entra tenant.
When John opens the URL to SAP Business Application Studio in an browser, he first gets redirected to the trusted identity provider (IDP) in the BTP subaccount to authenticate. In BTP, this task is delegated to an Identity Authentication Service (IAS) tenant of the SAP Cloud Identity Services using the OpenID Connect (OIDC) protocol. Since the IAS tenant is not aware of John's memberships in Entra security groups, it forwards the application's OIDC authorization request to Entra ID by acting as an OIDC proxy. This requires to configure the Entra ID tenant as a Corporate IDP in IAS which causes John to sign-in to Entra instead of IAS. Upon successful authentication, Entra sends the OIDC authentication response back to IAS, containing an authorization code to request the ID and access tokens from Entra.
To identify the IAS tenant as a legitimate client when sending the OIDC token request, Entra requires IAS to authenticate. OIDC defines several authentication methods for clients, such as a client secret, which is a shared secret with a configurable expiration date (maximum 24 months) generated by Entra and shared with IAS. The drawback of using a client secret is that it is sent every time when IAS performs client authentication to obtain the tokens from Entra. When the secret is about to reach its expiration, the secret must be rotated in Entra ID and shared again with the administrator of the IAS tenant.
To reduce the administrative overhead and avoid sending a shared secret, OIDC also supports client authentication based on an asymmetric key pair. Here, the IAS tenant as the OIDC (proxy) client generates a JSON Web Token (JWT) according to RFC 7532 and uses its private key to sign it. The corresponding public key certificate is shared with the Entra tenant to establish the trust relationship. Similar to the claim configuration of the issued tokens, trust to the IAS JWT signing certificate is configured in the SAP Cloud Identity Services Application Registration.
Now that the information about John's membership in the Entra security group SAP BTP Developer can be securely transferred to BTP when John authenticates with IAS on BTP, one question still remains opens: How is John assigned to the Developer role in BTP if he is a member of the SAP BTP Developer group in Entra? Let's have a look at John's OAuth JWT access token issued by Entra ID in the token response to the IAS token request:
Figure 2: Entra ID Access Token
John's membership to the SAP BTP Developer group is emitted as a claim with the name groups that contains an array of GUIDs (globally unique identifiers). Each GUID is the value of the Security group's object identifier (OID) attribute in Microsoft Entra. In BTP, a role collection can be assigned to a user group by mapping the group(s) OID(s) to the role collection. This approach follows the recommendations for federated authorization management between Entra and IAS, and will be configured in the following steps.
To follow the steps in this tutorial, make sure you have access to the following services:
Let's get started with creating the application registration for SAP Cloud Identity Services and configuring the token claims for it.
Step | Description | Screenshot |
1 | Login to the Entra admin center with your Entra administrator. Go to Identity -> Applications -> App Registrations. Click New registration. | |
2 | Enter a name, e.g. "SAP Cloud Identity Services". Click Register. | |
3 | Copy the Application (client) ID from the Overview to the clipboard and paste it into a text file for later use. | |
4 | Click Endpoints. | |
5 | Copy the OpenID Connect metadata document URL to the clipboard and paste it into a text file for later use. Close the dialog window. | |
6 | Select Token configuration from the menu. Click Add groups claim. | |
7 | Activate the Security groups checkbox. Click Add. |
The data captured from the app registration in Entra is now required to configure the OIDC proxy settings for the corporate IDP in IAS.
Step | Description | Screenshot |
8 | Open a new tab in the browser and login to the Administration Console of your SAP CIS IAS tenant at https://<ias-tenant-name>.accounts.ondemand.com/admin Go to Identity Providers -> Corporate Identity Providers. | |
9 | Click Create. | |
10 | Enter a Display Name, e.g. "BestRun Corp. Entra ID Tenant". Select OpenID Connect Compliant for the Identity Provider Type. Click Create. | |
11 | For the newly created Corportate Identity Provider, select OpenID Connect Configuration from the Trust tab. | |
12 | Paste the URL copied in step 5 into the Discovery URL field. Click Load. | |
13 | From the Client Authentication Method drop-down list, select Private key JWT. | |
14 | Paste the value of the Application (client) ID copied in step 3 into the Client ID field. | |
15 | Scroll down to the Scopes section and click Add. | |
16 | Enter offline_access for the new scope value. Click Save. | |
17 | Scroll up and click Save. Then, click OIDC Callback URL to copy the value into the clipboard. | |
18 | From the navigation menu, select Applications & Resources -> Tenant Settings | |
19 | On the Authentication tab, go to your tenant's OpenID Connect Configuration. | |
20 | Click the Download button of the default Signing Certificate. Note: If the download is not working, click on the Display icon. Copy the Certificate Information content into a text file and add the BEGIN/END-CERTIFICATE tags as follows: -----BEGIN CERTIFICATE----- | |
21 | From the navigation menu, select Applications & Resources -> Applications | |
22 | Select your SAP BTP subaccount listed under Bundled Applications. Select Conditional Authentication from the SAP BTP subaccount's Trust settings. | |
23 | From the Default Identity Provider drop-down list, select the corporate identity provider created earlier. Click Save. | |
24 | Select Attributes from the SAP BTP subaccount's Trust settings. | |
25 | Click Add. | |
26 | In the Name field of the new attribute, enter "groups". Select "Corporate Identity Provider" as the Source. Enter "${corporateIdP.groups}" in the Value field. This additional attribute setting forwards the value of the groups claim in the Entra ID token to the BTP applications in the SAP BTP subaccount. Click Save. |
To complete the OIDC proxy setup between Entra ID and IAS, the trust relationship must be established by uploading the IAS signing certificate to Entra and registering the IAS callback URL.
Step | Description | Screenshot |
27 | Go back to the Entra Admin center browser tab. Go to Manage -> Authentication. Click Add Platform. | |
28 | Select Web. | |
29 | Paste the OIDC Callback URL copied in step 17 into the Redirect URIs field. Click Configure. | |
30 | Go to Manage -> Certificates & Secrets. On the Certificates tab, click Upload certificate. | |
31 | Open the file upload dialog and select the certificate file you downloaded in step 20. Click Add. | |
32 | The IAS signing cerificate is now listed under the Certificates tab. |
Now that the OIDC proxy setup is completed in Entra, you can validate the configuration in IAS.
Step | Description | Screenshot |
33 | Go back to the IAS Administration console browser tab. Navigate to Identity Providers -> Corporate Identity Providers in the menu. | |
34 | Select your corporate identity provider from the list and select OpenID Connect Configuration. Click Validate. | |
35 | Accept the requested permissions from the Entra SAP Cloud Identity Services app. You may also activate the checkbox to consent on behalf-of your organization. | |
36 | You can now inspect the token sent by Entra to IAS and see for example the groups claim and its values for your user. |
Continue the setup in the Entra Admin center by creating the group for SAP BTP Developers.
Step | Description | Screenshot |
37 | Go back to the Entra Admin center browser tab. Navigate to Identity -> Groups. Click New Group. | |
38 | Select Security for the Group type. Enter a Group name, e.g. "SAP BTP Developer". Select Assigned from the Membership type drop-down list. Click Create. | |
39 | Select the newly created group from the list. | |
40 | Copy the Object ID to the clipboard and paste the value into a text file for later use. |
Lorem ipsum
Step | Description | Screenshot |
41 | In a new browser tab, login to your BTP subaccount in the BTP Cloud Cockpit. For a trial account, use this link. Select your subaccount. | |
42 | Navigate to Security -> Role collections. Select the Business_Application_Studio_Developer role collection from the list. Click Edit. | |
43 | Under User Groups, select the IAS tenant as the identity provider, and paste the Object ID from the Entra ID group you copied in step 40. |
Now it is time to configure the workflow for requesting and approving access to BTP by creating the access package in Entra ID Governance entitlement management.
Step | Description | Screenshot |
44 | Go back to the Entra Admin center browser tab. Navigate to Identity Governance -> Entitlement management -> Access Packages. Click New access package. | |
45 | Enter a Name, e.g. "SAP BTP", and provide a short Description. You can leave the assignment of the new access package to the General catalog. Click Next: Resource roles. | |
46 | Click Groups and Teams. | |
47 | Activate the checkbox to see all Groups and Teams not in the General catalog. In the search field, enter the name of the group you created, e.g. "SAP BTP Developer" Activate the checkbox of the group from the search results list. Click Select. | |
48 | Click Next: Requests. | |
49 | Select For users in your directory and allow All members (excluding guests) therein to make a request for the access package. | |
50 | Scroll down to the Approval section. Choose Yes to Require approval. For the First Approver, select Choose specific approvers from the drop-down list. Click Add approvers. | |
51 | Search for your user who will approve the access request and click Select. | |
52 | Choose Yes to Enable new requests. Click Next: Requestor information. | |
53 | Click Next: Lifecycle. | |
54 | Click Next: Rules. | |
55 | Click Next: Review + create. | |
56 | Click Create. | |
57 | Copy the link to MyAccess portal to the clipboard and paste it into a text file for later use. |
Now you are ready to test the scenario! Let's start with verifying that access is still denied for your test user.
Step | Description | Screenshot |
58 | Go back to the BTP Cloud Cockpit browser tab. Navigate to your subaccount's Services -> Instances and Subscriptions. Copy the URL to the SAP Business Application Studio to the clipboard. | |
59 | Open a new private browser window. Paste the URL you copied in the previous step to your SAP Business Application Studio instance from the clipboard into the browser and hit Enter. You are redirected by the IAS tenant to Entra ID as the corporate IDP for your BTP subaccount's business applications. Login as the test user who will request access to SAP Business Application Studio. | |
60 | You see a message that the user has no access yet due to the missing assignment to the Developer role. |
Step | Description | Screenshot |
61 | Start the request workflow in a new tab of the private browser window by opening the URL to the MyAccess portal you copied in step 58. Click Continue. | |
62 | Click Submit request. | |
63 | You receive a confirmation message that your request to access the SAP BTP package is being processed. |
Now you take over the role as the approver.
Step | Description | Screenshot |
64 | Re-open a private browser window. Start the approval workflow by opening the URL to the MyAccess portal you copied in step 57. Login as the user who you selected in step 51 for approving requests of the SAP BTP access package. | |
65 | Naviate to Approvals in the MyAccess portal. Select your other test user's access request from the list of Pending approvals. Click Approve. | |
66 | Click Submit. | |
67 | You receive a confirmation message you approved the request. Close the private browser window. |
Now let's try again to open SAP Business Application Studio as the test user with the approved access request.
Step | Description | Screenshot |
68 | Re-open a private browser window. Go to the URL of the SAP Business Application Studio you copied in step 58. You are redirected by the IAS tenant to Entra ID as the corporate IDP for your BTP subaccount's business applications. Login as the test user who has requested access to SAP Business Application Studio. | |
69 | This time the user can successfully load and use the SAP Business Application Studio. |
With this last step you've successfully completed the scenario and I hope you enjoyed it!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |