Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
MartinRaepple
Active Participant
4,055

Part I of this blog series described a federated approach for cross-domain identity and access management by using the groups claim in the OAuth access token sent by Microsoft Entra ID to the SAP Cloud Identity Services (CIS) Identity Authentication tenant. With the tenant acting as an identity provider (IdP) proxy in part I, the user's group membership(s) in the groups claim were forwarded to the SAP Business Technology Platform (BTP). By sharing the user's identity information in a secure and interoperable token across system and technology boundaries, the application on BTP (SAP Business Application Studio) could successfully authenticate and authorize the user, even without creating a user account in the application's database or in the CIS tenant's identity directory.

Part II of the blog post series extends the Cloud-only scenario in part I with a hybrid identity setup that requires managing the user lifecycle across Microsoft Active Directory, Microsoft Entra, SAP BTP, SAP CIS, and an SAP system on-premise. Again, this blog post aims to provide technical guidance for migrating identity management processes from SAP Identity Management (IDM) to Microsoft Entra. Kudos to Marko Sommer (@MSo) for supporting the SAP cloud setup.  

 

📢 📢 📢  Note

For a live demo recording (in German language) of the scenario in this blog post, check out the online session from January 16th 2025 with the Deutschsprachige SAP Anwendergruppe e.V. (DSAG) working group Identity Access Management. For a demo in English language, tune in to the SAP on Azure video podcast episode 226. 

Scenario overview

Similar to part I, this scenario follows SAP's reference architecture for Cloud-leading identity lifecycle, It relies on the Identity Provisioning service (IPS) in SAP Cloud Identity Services (CIS) to replicate users stored in the CIS tenant's Identity Directory into the target application(s), which is an SAP Application Server ABAP system on-premises in this scenario. This scenario also continues like in part I to use access packages from Entitlement Management in Microsoft Entra ID Governance to centrally control who has access to which resources across the application portfolio of the fictitious company BestRun Corp.

Figure 1 shows the hybrid landscape and provisioning flow for a new employee. Instead of the manual approval workflow as implemented in part I, the objective in this part is to fully automate the lifecycle management of user accounts, license assignments, and authorizations of new employees with Entra and ClS to implement the following requirements:

  • Every new employee must have instant access to the productivity and AI tools from BestRun's Microsoft 365 enterprise subscription.
  • Employees in BestRun's IT department need access to the SAP system on-premise with the required authorizations for ABAP development. BestRun's security policy requires an SNC (Secure Network Communications)-secured connection and single sign-on (SSO) from SAP GUI with a Kerberos ticket issued by the corporate Active Directory (AD) Domain Controller (DC). For SSO, the Kerberos principal for the Windows user must be mapped to the SAP user in the backend.

Figure 1: User provisioning from Entra to BTP and S/4HANAFigure 1: User provisioning from Entra to BTP and S/4HANA

Let's have a look at the provisioning flow for a new user in this hybrid scenario in more detail:

  1. A new user account is created in BestRun's AD for the new employee. Every employee has a common set of organizational attributes, such as companyName ("BestRun Corp.") and department, which is set according to the employee's role in the organization, for example "Information Technology" for new members in BestRun's IT team.
  2. The Microsoft Entra Cloud Sync Provisioning Agent on the DC host provides the connectivity between the corporate network and Microsoft Entra ID. It takes care for synchronizing users and groups created, updated or deleted in AD to BestRun's Entra ID tenant every 2 minutes.
  3. The agent follows the de-facto standard SCIM (System for Cross-domain Identity Management) 2.0 that is detailed in SCIM 2.0 Core Schema (RFC 7643) and SCIM 2.0 Protocol (RFC 7644) to provision and deprovision users and groups in Entra ID. The agent also supports the synchronization of the user password hash to allow users to sign-in to Cloud services like Microsoft 365 with the same password they use to sign in to the AD on-premise. With password writeback, the agent enables self-service scenarios to reset or change the user's password in the Cloud, and have that updated password synchronized back to the AD on-premises environment. To configure the provisioning from AD, the Entra administrator creates a syncronization configuration for the agent in the Cloud that can be tailored towards specific users or groups, mapping of attributes etc.
  4. To auto-assign new employees and their accounts to a Microsoft 365 license, the M365 access package has a policy configured to automatically assigns each (new or updated) user with the attribute companyName set to "BestRun Corp." and who are members (not guests) in the Entra ID tenant to the "M365 User" group. In the Microsoft 365 admin center, the Microsoft 365 license is assigned to the "M365 User" group.
  5. A second access package in this scenario, "SAP A4H", auto-assigns users to the "SAP User" group who have their department attribute set to the value "Information Technology".
  6. Configuring the Entra ID tenant to provision users into the SAP CIS tenant requires to add "SAP Cloud Identity Services" from the Microsoft Entra application gallery to the Entra ID tenant's list of enterprise applications. This enterprise application is scoped to provision only users from the "SAP User" group, and has access to the credentials (username and password) of a system administrator with the name "Entra tenant bestruncorp" created in the SAP CIS tenant. This system administrator account has the required authorization in the SAP CIS tenant to execute the provisioning operations in the scenario. For applications listed in the gallery like "SAP Cloud Identity Services", provisioning follows the SCIM standard to ensure cross-domain interoperability. The enterprise application centrally controls all  required identity attribute mapping and transformation logic in the scenario, such as the SAP login name derived from the Windows user name, and construction of the SNC mapping following the format "p:<Windows user name>@<Kerberos realm name>". For transferring both values to CIS, the custom attributes defined in SAP's SCIM user schema extension "urn:sap:cloud:scim:schemas:extension:custom:2.0:User" are used.
  7. New users in Entra are provisioned to the SAP CIS tenant's identity directory. As the persistent layer in the SAP CIS tenant, the identity directory is the source system in the tenant's IPS for the synchronization of users and groups to downstream target systems, such as the on-premise SAP system in this scenario.
  8. SAP CIS IPS uses SAP BTP's connectivity service to establish a secure connection from CIS to the SAP system on the corporate network. All required configuration settings for the connection, such as the SAP System ID or authentication details to connect to the SAP application server, are stored in a destination in the SAP BTP subaccount. For the provisioning service to successfully use the destination and connectivity service, the BTP subaccount must have a subscription to the SAP CIS tenant with plan type "connectivity" and the required entitlement in the subaccount for it.
  9. Finally, the connectivity services uses the destination to establish the connection to the SAP system on-prem via the SAP Cloud Connector.
  10. Cloud connector uses the SAP Java Connector (JCo) to call the Business Application Programming Interfaces (BAPIs) for managing users in the SAP ABAP application server and creating the new user in the system. As part of this operation, it also writes the SNC mapping required for SSO that were created in step 6 with the attribute transformation in Entra. 

Prerequisites and lab setup

Before you start, check if you fulfill the following prerequisites for a working lab environment for this scenario:

  • A test or productive CIS tenant with full administrative access. Note: This scenario cannot be implement with a free trial tenant because it cannot connect to on-premise systems using the cloud connector.
  • An SAP BTP enterprise account (a global account of type enterprise). Note: It is not possible to subscribe to the CIS connectivity plan in a trial account. If you do not have an enterprise account and wish to explore or buy one, you may refer to a pay-as-you-go license.
  • Administrative access to a subaccount in your enterprise account that maps to the CIS tenant's region according to the table documented here. For example, if your CIS tenant is located in "US West", your subaccount must be created in the BTP region "US West (WA)" on Azure. Once you create the subaccount, you must enable Cloud Foundry for this subaccount.
  • Administrator-level access to an Microsoft Entra ID P2 subscription. You can obtain a P2 tenant for development and learning purposes with a free Microsoft 365 E5 developer program subscription. To qualify for the developer program, a valid Visual Studio subscription is required. With this subscription you can request a trial of Microsoft Entra ID Governance by following these steps.
  • Administrative access to an AD Domain Services (DS) instance. I've created this system in my lab environment as a Hyper-V Windows Server 2019 guest operation system Virtual Machine (VM) on my Windows 11 host, but you can also run your AD instance in the cloud on an Azure VM. The VM has the AD DS role added to it and is promoted to a DC following this documentation. The domain name used in this tutorial is corp.bestrun.com (NetBIOS: CORP), but you can also choose a different name. The VM has the Microsoft Entra Provisioning Agent installed following these instructions, and the SAP Cloud Connector as documented here. Configuration of the provisioning agent and cloud connector for the scenario will be covered in the tutorial steps below.
  • Administrative access to an SAP Application Server ABAP that serves as the target system in the provisioning scenario. One of the easiest ways to setup a free development and test system is to run the ABAP Platform Trial on Docker. Setup of the SNC configuration for Kerberos SSO is described in this related blog post (see section "Configure SAP for Kerberos-based SSO with Active Directory").
  • For testing a successful end-to-end provisioning in this scenario, the user will single sign-on via SAP GUI to the SAP system. This requires a Windows 10 or 11 workstation that is domain-joined and has SAP GUI for Windows and SAP Secure Login Client (SLC) installed. In my lab environment, I am running Windows 10 in a Hyper-V VM to simulate the user's workstation. In a simplified setup you can also run the test from the AD DC.

Ready? Then let's get started with preparing the SAP system for the integration with IPS. Some steps will refer to the associated GitHub repository that contains configuration files to simplify the setup.

Create System User and Role for provisioning in the SAP system

A system user with the required authorizations to execute the user management BAPIs will be created in the SAP system and its credentials will be shared later to configure the destination for IPS in SAP BTP.

StepDescriptionScreenshot
1.1

Login to the SAP ABAP application server as an administrator (e.g. user DEVELOPER if you are using the ABAP Developer trial Docker image). All steps in this tutorial will be executed in SAP logon client "001", but you may choose a different client.

Start by creating a role with the required authorizations for provisioning users from IPS.

Execute transaction PFCG for role maintenance.

Enter SAP_BC_JSF_COMMUNICATION in the Role field and click Copy. 

1-1.jpg
1.2

Enter name of the new role in the to role field, for example "ZIPS_USER_PROVISIONING".

Click Copy all.

1-2.jpg
1.3Enter the new role's name in the Role field and click Change.1-3.jpg
1.4

Change the Description and Long Text.

Click Save.

Switch to the Authorizations tab.

1-4.jpg
1.5

 Click Change Authorization Data.

1-5.jpg
1.6

Expand the subtree of Object class AAAB.

For Authorization object S_RFC, click Change to edit the value of field name RFC_NAME for Authorization "Authorizat. 01".

1-6.jpg
1.7

Scroll down in the table and select the first empty row.

Enter RFC_METADATA_GET in the 'From' field.

Select the next empty row, and enter RFCPING in the 'From' field.

The table should now list the following RFC function modules that are authorized with the new role ZIPS_USER_PROVISIONING copied from SAP_BC_JSF_COMMUNICATION:

  • BAPI_USER_ACTGROUPS_ASSIGN
  • BAPI_USER_CREATE1
  • BAPI_USER_DELETE
  • BAPI_USER_GETLIST
  • BAPI_USER_GET_DETAIL
  • IDENTITY_MODIFY
  • PRGN_ACTIVITY_GROUPS_LOAD_RFC
  • PRGN_ROLE_GETLIST
  • RFC_METADATA_GET
  • RFCPING

Click Save.

1-7.jpg
1.8Click Generate to update the profile(s).1-8.jpg
1.9

 

Confirm the generation of the new default profile for your role.

1-9.jpg
1.10Click Exit.1-10.jpg
1.11

Go to user maintenance with transaction code "/nSU01".

1-11.jpg
1.12

In the User field, enter "SAPIPS".

Click Create User (F8).

1-12.jpg
1.13

Enter "SAPIPS" for the Last Name.

Switch to the Logon Data tab.

1-13.jpg
1.14

Select User Type "System".

Enter a password in New Password, and enter it again in Repeat Password.

Note: You will need the password later for the configuration of the destination for IPS in SAP BTP.

Click Save.

1-14.jpg
1.15

Switch to the Roles tab.

Select the Role column of the first row in the Role assignment table and click on the value help button.

1-15.jpg
1.16

Switch to the Single Roles tab.

In the Single Role field, enter "ZIPS_*"

Click Start Search.

1-16.jpg
1.17

Activate the checkbox for the ZIPS_USER_PROVISIONING role in the search results.

Click Copy.

1-17.jpg
1.18Click Save.1-18.jpg

Configure SAP Cloud Connector

The following steps assume that the SAP Cloud Connector is already installed and started on the AD DC host with Internet access and connectivity to the SAP system on the internal network.

StepDescriptionScreenshot
2.1

Login to the SAP BTP Cockpit and select your subaccount.

As mentioned in the prerequisites section, make sure that the region of the selected subaccount maps to the region of your CIS tenant as documented in this table

2-1.jpg
2.2

Navigate to Connectivity -> Cloud Connectors.

Click Download Authentication Data.

2-2.jpg
2.3

Login to the AD DC as the domain administrator.

Open a browser and access the login page of your SAP Cloud Connector instance at https://<AD DC IP address or hostname>:8443

Login with the SAP Cloud Connector Administrator user. 

2-3.jpg
2.4Click Add subaccount.2-4.jpg
2.5

Select Configure using authentication data from file.

Click Next.

2-5.jpg
2.6

Click Browse and select the file you downloaded in step 2.2.

Click Next.

2-6.jpg
2.7Click Finish.2-7.jpg
2.8

Navigate to Cloud To On-Premise in the newly added subaccount.

On the ACCESS CONTROL tab, click '+' to add a new system mapping.

2-8.jpg
2.9

Select "ABAP System" as the Back-end Type.

Click Next.

2-9.jpg
2.10

Select RFC as the Protocol.

Click Next.

2-10.jpg
2.11

Select Without load balancing (application server and instance number).

Click Next.

2-11.jpg
2.12

Enter your SAP ABAP server IP address in the Application Server field.

Enter the instance number (e.g. '00' if you are using the ABAP Platform Trial on Docker).

Click Next.

2-12.jpg
2.13

Enter a name for the Virtual Application Server, e.g. "sap<SID>" ("sapa4h" if you are using the ABAP Platform Trial on Docker).

Enter a Virtual Instance Number (e.g. "00").

Click Next.

2-13.jpg
2.14

The value for the entry field System ID should be populated automatically in a few seconds with the SID for your ABAP application server (e.g. "A4H" if you are using the ABAP Platform Trial on Docker).

Click Next.

2-14.jpg
2.15

Optionally enter a description for the new system mapping.

Click Next.

2-15.jpg
2.16

Activate the checkbox for Check Internal Host.

Click Finish.

2-16.jpg
2.17The new system mapping for the ABAP system is added to the list and should report the status Reachable in the column Check Result.2-17.jpg
2.18

Click '+' in the Resources Of section to add the function modules accessible for this system.

Alternatively, you can also click Import. Download the resource file from this Git repository and import it. You can then skip steps 2.19 and 2.20.

2-18.jpg

 

2-19-2.jpg

2.19

Enter PRGN_ROLE_GETLIST for the Function Name.

Click Save.

2-19.jpg
2.20

Repeat the previous step for the following functions:

  • BAPI_USER_ACTGROUPS_ASSIGN
  • BAPI_USER_CREATE1
  • BAPI_USER_DELETE
  • BAPI_USER_GETLIST
  • BAPI_USER_GET_DETAIL
  • IDENTITY_MODIFY
  • PRGN_ACTIVITY_GROUPS_LOAD_RFC
2-20.jpg

 

Configure the destination in the SAP BTP subaccount

With the SAP Cloud Connector now connected to the subaccount, a destination from SAP BTP to the SAP system on-premise is required to enable IPS to provision the users.

StepDescriptionScreenshot
3.1

Go back to the SAP BTP Cockpit browser window from the previous step.

Verify that the Cloud Connector is successfully connected to the subaccount and shows the ABAP application server in the Exposed Back-End Systems section.

Navigate to Connectivity -> Destinations.

3-1.jpg
3.2

Click Create Destination.

Note: You cal also click Import Destination and import the configuration from this file on the Git repository. Enter the password from step 1.3 and verify the property values against your setup. Save the destination and continue with step 3.6.

3-2.jpg
3.3

Enter the following values:

  • Name: For example "SAP<SID>" ("SAPA4H" for ABAP Platform Trial on Docker)
  • Type: Select "RFC"
  • Proxy Type: Select "OnPremise"
  • User: "SAPIPS" (see step 1.1)
  • Password: The password you entered in step 1.3.
  • Authorization Type: Select "CONFIGURED_USER"

Click New Property.

3-3.jpg
3.4

Select jco.client.client from the list of properties and enter 3-digit number of the SAP logon client you used to configure the steps in the first section of this tutorial (e.g. "001").

Click New property.

3-4.jpg
3.5

Repeat the previous step for the follow properties:

  • "jco.client.ashost": Name of the Virtual Application Server entered in step 2.13, e.g. "sapa4h".
  • "jco.client.sysnr": The Virtual Instance Number you entered in step 2.13, e.g. "00".

Click Save.

3-5.jpg
3.6Click Check availability of destination connection to verify that the connection between BTP and and the SAP system on-premise via SAP Cloud Connector works.3-6.jpg
3.7

Wait for the confirmation of the successful connection.

Click Close.

3-7.jpg

Create the system user in SAP CIS tenant

To authorize Microsoft Entra for provisioning and de-provisioning users to SAP CIS, a system user must be created in SAP CIS that will be used in the next step in Entra.

StepDescriptionScreenshot
4.1Login to the Administration Console of your SAP CIS tenant at https://<tenant_hostname>.accounts.ondemand.com/admin4-1.jpg
4.2

Navigate to Users & Authorizations -> Administrators from the top menu bar.

Click "+ Add" and select System from the drop-down list-

4-2.jpg
4.3

Enter a name for the new Administrator of type System, for example "Entra Tenant <name of your tenant, e.g. bestruncorp".

Activate the check-boxes for the following authorizations:

  • Manage Users
  • Read Users
  • Manage Groups

Click Save.

4-3.jpg
4.4Select Secrets from the configuration settings.4-4.jpg
4.5Click "+ Add".4-5.jpg
4.6

Enter a description for the new secret and choose an expiration time. For testing purposes you may choose "Never" from the drop-down list.

Click Save.

4-6.jpg
4.7

Copy & paste the values for Client ID and Client Secret into a notepad. You will need them in the next section.

Click OK.

4-7.jpg

Create groups in Microsoft Entra

Let's move over to the Microsoft Entra Admin Center to create the required groups for the scenario: "SAP User" and "M365 User".

StepDescriptionScreenshot
5.1

Login with your Microsoft Entra tenant administrator to the Entra admin center with an additional URL query parameter Microsoft_AAD_Connect_Provisioning_forceSchemaEditorEnabled set to true: https://entra.microsoft.com/?Microsoft_AAD_Connect_Provisioning_forceSchemaEditorEnabled=true.

This query parameter enables the Entra administrator to edit and enhance the list of supported Entra attributes for the provisioning configuration of the CIS tenant continued in the admin center in the next section. The additional attribute is required to access the Windows user name and Kerberos realm to construct the SNC mapping in the scenario.

Navigate to Identity -> Groups -> Overview.

Click New group.

5-1.jpg
5.2

Enter "SAP User" for the Group name.

Click Create.

5-2.jpg
5.3Click New group.5-3.jpg
5.4

Enter "M365 User" for the Group name.

Click Create.

5-4.jpg

Setup SAP Cloud Identity Services Provisioning in Microsoft Entra

To simplifies the process for setting up automatic user provisioning from Microsoft Entra to the SAP CIS tenant, create an enterprise application from the Microsoft Entra application gallery.

StepDescriptionScreenshot
6.1

Navigate to Identity -> Applications -> Enterprise Applications.

Click New application.

4-1.jpg
6.2

From the Microsoft Entra Gallery, enter "SAP Cloud Identity Services" in the search field.

Click on the tile with the label "SAP Cloud Identity Services" from the search results.

4-2.jpg
6.3

Enter a name for the new enterprise application that represents your CIS tenant, e.g. "SAP Cloud Identity Services (<tenant>)", and replace <tenant> with the hostname of your CIS tenant.

Click Create.

6-3.jpg
6.4

Click Add user/group.

6-4.jpg
6.5Click None Selected.6-5.jpg
6.6

Type "SAP User" in the Search field.

From the search results, active the checkbox for the SAP User group.

Click Select.

6-6.jpg
6.7

Click Assign.

By assigning the SAP User group to the enterprise application you can scope provisioning to SAP CIS for only those users who are a member in this group.

6-7.jpg
6.8Navigate to Manage -> Provisioning.6-8.jpg
6.9

Select Manage -> Provisioning and switch to Provisioning Mode "Automatic".

Expand the Admin Credentials section and provide the following configuration:

Click Test Connection.

5-5.jpg
6.10

Wait for the successful confirmation of the connection test from Entra to CIS. 

Click Save.

5-6.jpg
6.11

Expand the Mapping section.

Click Provision Microsoft Entra ID Users to edit the pre-configured list of attribute mappings for SAP CIS.

 

6-11.jpg
6.12

Activate the checkbox Show advanced options.

By accessing the Microsoft Entra Admin Center with the addition URL query parameter in step 5.1, the additional option to edit the attributes for Entra appears in the Supported Attributes section.

Click Edit attribute list for Microsoft Entra ID.

6-12.jpg
6.13

Scroll down to the last row in the table and enter "onPremisesUserPrincipalName" in the attribute name field.

Click Save, and confirm the dialog with Yes.

6-13.jpg
6.14Click Add New Mapping to provision the user's company name ("BestRun Corp.") to CIS.6-14.jpg
6.15

For the Source attribute in Entra, select companyName.

For the Target attribute in CIS, select company.

Click Ok.

6-15.jpg
6.16

Click Add New Mapping to provision the user's SAP login name to CIS using custom attribute 1 from the SCIM user schema extension in CIS.

Note: The definition of the custom schema extension can be a retrieved from the CIS tenant with the URL https://<tenant_name>.accounts.ondemand.com/scim/Schemas/
urn%3Asap%3Acloud%3Ascim%3Aschemas%3Aextension%3Acustom
%3A2.0%3AUser (authentication required with the credentials configure in step 4.7).

6-16.jpg
6.17

Select "Expression" for Mapping type.

The Entra attribute "onPremisesUserPrincipalName" added in step 6.13 has the format "<Windows user name>@<Kerberos realm name>". The SAP login name should be equal to the Windows user name that can be considered unique across all users in the organization.

The following expression extracts the Windows user name from the "onPremisesUserPrincipalName" and converts it to upper case for the SAP login name:

ToUpper(Item(Split([onPremisesUserPrincipalName], "@"), 1), )

Enter this string for the Expression.

As the Target attribute, select "urn:sap:cloud:scim:schemas: extension:custom:2.0:User:attributes:customAttribute1" from the list.

Click Ok.

6-17.jpg
6.18Click Add New Mapping to provision the user's SNC mapping using custom attribute 2 from the SCIM user schema extension in CIS.6-18.jpg
6.19

Select "Expression" for Mapping type.

The Entra attribute "onPremisesUserPrincipalName" added in step 6.13 contains the same value as the user's identifier in the Kerberos ticket issued by the DC when the user single signs-on in SAP GUI with SAP Secure Login Client.

To map the Windows user to the SAP user in the backed system, the onPremisesUserPrincipalName must be prefixed with the string "p:" using the following expression with the Join function:

Join("", "p:CN=", ToUpper([onPremisesUserPrincipalName], ))

Enter this string for the Expression.

As the Target attribute, select "urn:sap:cloud:scim:schemas: extension:custom:2.0:User:attributes:customAttribute2" from the list.

Click Ok.

6-19.jpg
6.20

Click Save. Confirm the dialog with Yes.

Navigate back to Identity -> Applications -> Enterprise Applications.

6-20.jpg
6.21

Navigate to Manage -> All applications.

Enter the SAP CIS enterprise application's name in the search field (e.g. "SAP Cloud Identity Services (<tenant>)").

Select the enterprise application from the list.

6-21.jpg
6.22Click Edit provisioning.6-22.jpg
6.23

Expand the Settings section.

Check that the Scope is set to "Sync only assigned users and groups".

Turn the Provisioning Status from Off to On.

6-23.jpg

Auto-assign users to the scenario groups with access packages

Access packages in Microsoft Entra ID Governance entitlement management can be used to automatically assign users to groups. In this scenario, the assignment to the "SAP User" and "M365 User" groups is based on the user's organizational attributes memberTypecompanyName and department.

StepDescriptionScreenshot
7.1

Navigate to Identity Governance -> Entitlement management.

Select Access packages from the submenu.

Click New access package.

7-1.jpg
7.2

Enter "M365" for the Name of the new access package, and provide a description.

Click Next: Resource roles.

7-2.jpg
7.3Click Groups and Teams.7-3.jpg
7.4

Switch to the Groups tab and activate the checkbox for the "M365 User"group.

Click Select.

7-4.jpg
7.5

Select "Member" from the Role drop-down list.

Click Next: Requests.

7-5.jpg
7.6

Select None for the Users who can request access.

Set Require approval to No.

Set Email Notifications to No.

Set Enable new requests to Yes.

Click Lifecylce.

7-6.jpg
7.7

For this test lab setup, select Never for Access package assignment expire.

Switch Users can request specific timeline to No.

Set Require access reviews to No.

Click Review + create.

7-7.jpg
7.8Click Create.7-8.jpg
7.9

Select Policies from the menu.

Activate the checkbox for "Initial Policy".

From the context menu ('...'), select Delete.

 

7-10.jpg
7.10Click Add auto-assignment policy.7-11.jpg
7.11Click Edit.7-12.jpg
7.12

Enter the following values for the first configuration rule:

  • Property: companyName
  • Operator: Equals
  • Value: BestRun Corp.

Click Add expression.

7-12.jpg
7-13

For the second rule enter the following values:

  • And/Or: And
  • Property: userType
  • Operator: Equals
  • Value: Member

Click Save.

7-14.jpg
7.14

Switch to the Review tab.

Click Create.

7-15.jpg
7.15Click Identity Governance | Access packages from the breadcrumb navigation.7-16.jpg
7.16Click New access package.7-17.jpg
7.17

Enter "SAP A4H" for the Name of the new access package, and provide a description.

Click Next: Resource roles.

7-18.jpg
7.18 Click Groups and Teams.7-19.jpg
7.19

Switch to the Groups tab and activate the checkbox for the "SAP User"group.

Click Select.

7-20.jpg
7.20

Select "Member" from the Role drop-down list.

Click Next: Requests.

Apply steps 7.6 to 7.11 to the "SAP A4H" access package.

7-21.jpg
7.21

Enter the following values for the configuration rule of the access package's auto-assignment policy:

  • Property: department
  • Operator: Equals
  • Value: Information Technology

Click Save.

7-22.jpg
7.22Click Create.7-23.jpg

Assign Microsoft 365 licenses to the M365 User group

With group-based licensing, users auto-assigned to the "M365 User" group with the "M365" access package created in the previous section will be assigned to the required Microsoft 365 license to use all AI and productivity apps.

StepDescriptionScreenshot
8.1

Sign in to the Microsoft 365 admin center as a License Administrator.

Navigate to Billing -> Licenses.

Select the Microsoft 365 E5 Developer license.

Note: The license name is "Microsoft 365 E5" for a non-developer subscription.

8-1.jpg
8.2

On the Licenses page, select the Groups tab.

Click + Assign Licenses.

8-2.jpg
8.3

Search for the "M365 User" group and select the group.

Click Assign.

8-3.jpg

Configure provisioning in IPS

To complete the setup of the scenario, provisioning in IPS must be configured to synchronize the users from the CIS tenant's Identity Directory to the SAP system on-premise. The corresponding source and target systems are imported with configuration files from the GitHub repository for this blog post series. 

StepDescriptionScreenshot
9.1

Login to the Administration Console (https://<tenant>.accounts.ondemand.com/admin)  of your CIS tenant.

Go to Identity Provisioning -> Source Systems.

9-1.jpg
9.2Click Add.9-2.jpg
9.3Click Browse... and open the file LocalDirectory.json from the GitHub repository.9-3.jpg
9.4

Upon successful import, click Save.

9-4.jpg
9.5Switch to the Jobs tab and click Schedule9-4-1.jpg
9.6

Turn the Job Scheduler to On.

Enter a time interval, e.g. 30 minutes for testing purposes.

Click Save.

9-4-2.jpg
9.7Go to Identity Provisioning -> Target Systems9-5.jpg
9.8Click Add.9-6.jpg
9.9Click Browse... and open the file SAPA4H_IPS.json from the GitHub repository.9-8.jpg
9.10Upon successful import. click Save.9-8.jpg
9.11

Switch to the Transformation tab.

Click on the JSON editor.

9-9.jpg
9.12

The lines marked in yellow show the mappings for SAP login name and SNC name added to the default configuration of a target system of type "SAP Application Server ABAP".

The mappings extract the values from the custom SCIM attributes 1 and 2, and pass their values to the corresponding fields in the target system data structure.

 

9-10.jpg
9.13

For a better understanding of the targetPath values in the mappings, run transaction SE37 in the ABAP system.

Enter "BAPI_USER_CREATE1" in Function Module and click Display.

9-10-1.jpg
9.14Go to More -> Function Module Documentation.9-13.jpg
9.15

The documentation for the function module opens in a new window.

Click SNC from the Parameters list.

9-14.jpg
9.16The data structure and field names for SNC are shown, such as SNC-PNAME that is used in the transformation to map the incoming SCIM user custom attribute 2 to the SAP user's SNC name.9-15.jpg
9.17

Note: The following steps 9.17 to 9.19 are optional.

If you want to assign the provisioned users to roles in the SAP ABAP system, create an equally named group in the SAP CIS tenant.

For the scenario test in the next section, we want to assign the user the SAP role SAP_BC_ABAP_DEVELOPER_5.

In the SAP CIS Administration Console, go to Users & Authorizations -> Groups.

Click Create.

9-16.jpg
9.18

Enter "SAP_BC_ABAP_DEVELOPER_5" as the Name and Display Name for the new group.

Click Next Step, and again Next Step on the next screen.

9-17.jpg
9.19

Click Finish.

9-18.jpg

Testing the scenario

Congratulations! You've completed the scenario setup and are now ready for testing with a new user for Susan Miller. In the course of provisioning Susan's account from AD to the SAP system, all intermediate steps in the Cloud will be inspected and troubleshooting techniques explored.

StepDescriptionScreenshot
10.1On the DC host, launch Windows Administrative Tools -> Active Directory Users and Computer from the Start menu.10-1.jpg
10.2

Expand the domain tree and right-click on Users.

From the context menu, select New -> User.

10-2.jpg
10.3

Enter first and last name, for example "Susan Miller".

As the User logon name, choose a unique value, for example "smiller".

Click Next.

10-3.jpg
10.4

Enter a password.

For testing purposes, disable to option that the user must change the password at next login.

Click Next.

10-4.jpg
10.5Click Finish.10-5.jpg
10.6

The user has not yet configured any organizational properties which are required for the auto-assignment to the groups in Entra.

Right-click on the new user object and select Properties from the context menu.

10-6.jpg
10.7

Switch to the Organization tab.

Enter "Information Technology" in Department.

Enter "BestRun Corp." in Company.

Click OK.

10-7.jpg
10.8

Go back to the Microsoft Entra admin center.

Go to Identity -> Hybrid management -> Microsoft Entra Connect.

Select Cloud Sync from the navigation menu.

10-8.jpg
10.9

Check that the configuration status for your on-premise domain is healthy.

Select Provisioning logs.

10-9.jpg
10.10From the logs you can see two entries for the new user Susan Miller: The first one (Action Create) when the user was created, the second one (Action Update) when the organizational attributes were changed.10-10.jpg
10.11

Verify that the new user has been assigned to the groups in Entra via the auto-assignment policies of the access packages.

Navigate to Identity Governance -> Entitlement Management -> Access packages.

Select the "M365" access package from the list.

10-11.jpg
10.12

Go to Assignments and check if the new user is listed.

Note: It can take several minutes until the evaluation of the auto-assignment criteria are reflected in the access package assignments.

10-12.jpg
10.13Repeat the previous step for the "SAP A4H" access package and wait until the assignment for the new user is delivered.10-13.jpg
10.14

Navigate to Identity -> Applications -> Enterprise Applications.

Select the enterprise application for your SAP CIS tenant from the list.

From the menu go to Provisioning -> Provisioning Logs.

In the search bar, enter the new user's name, for example "Susan".

Check the log entries. The first one in the list shows a provisioning status "Skipped", and second has status "Success".

Click on the first entry with status "Skipped".

10-14.jpg
10.15

From the description you can see that the user object was not (yet) assigned to the application.

Based on the scope settings (see steps 6.4 and 6.23), only members of group "SAP User" are provisioned to SAP CIS.

Since the user hasn't been auto-assigned to the group based on the missing department value at this time, the provisioning was skipped.

On the next provisioning interval 40 minutes later, the auto-assignment occurred, and the user was now in scope for provisioning to CIS.

10-15.jpg
10.16

Move over to the SAP CIS administration console.

Go to Users & Authorizations -> User Management.

Search for the new user, e.g. by login name ("smiller").

10-16.jpg
10.17

Check if the user has already been provisioned to the SAP system.

Go to Identity Provisioning -> Provisioning Logs.

10-17.jpg
10.18

Check the Job Logs for the most recent entry of the Source System "LocalDirectory".

Click on the log entry.

10-18.jpg
10.19From the Statistics section, check that an Entity of type user has been created in (target) system SAPA4H.10-19.jpg
10.20

Note: The following steps 10.20 to 10.23 are optional.

If you want to test role provisioning for the SAP user, go to Users & Authorizations, select the SAP_BC_ABAP_DEVELOPER_5 group.

In User Members, click Add.

10-32.jpg
10.21Search for the new user (e.g. "Susan Miller") and click Add.10-33.jpg
10.22

Go back to Identity Provisioning -> Source Systems, and select the LocalDirectory.

Switch to the Jobs tab.

To trigger an immediate provisioning of the new group membership, click Run Now for the Read Job.

10-34.jpg
10.23

Go to Identity Provisioning -> Provisioning Logs.

Check for the most recent entry that for Entity group a new entry has been updated in (target) system SAPA4H.

10-35.jpg
10.24

Login to the SAP system as the administrator (e.g. user DEVELOPER if you are using the ABAP Developer trial Docker image).

Run transaction SU01.

Enter "SMILLER" in the User field and click Display.

10-20.jpg
10.25

Check if the Address fields are set correctly.

Switch to the SNC tab.

10-21.jpg
10.26Verify that the user's SNC name is correctly mapped according to the expression used in step 6.19 to create the string, and the transformation used in step 9.12 to set the value.10-22.jpg
10.27Optionally switch to the Roles tab if you ran steps 10.20 to 10.23 before and check if the role SAP_BC_ABAP_DEVELOPER_5 has been assigned successfully.10-36.jpg
10.28

Login as the new user to AD from the domain-joined workstation.

10-23.jpg
10.29

Launch the SAP GUI and create a new connection to the SAP system.

10-24.jpg
10.30

For the Secure Network Settings, make sure to click the checkbox "Activate Secure Network Communication", and enter the correct SNC Name for your SAP system.

If you are using the ABAP Developer trial Docker image, the value is "p:CN=A4H, OU=IDEMOSYSTEM, OU=SAP Web AS, O=SAP Trust Community, C=DE".

10-25.jpg
10.31Double-click on the new entry.10-26.jpg
10.32

Because this is the first login for the new user you are prompted to either reset the initial password, or deactivate it.

Click on Delete to use SNC and Kerberos-based SSO. 

10-27.jpg
10.33You are single signed-on to the SAP system using SNC and Kerberos SSO.10-28.jpg
10.34

Finally, also verify if the Microsoft 365 license has been successfully assigned to the new user.

Open a browser and go to https://www.office.com

10-29.jpg
10.35Sign-in as the new user to the Entra ID tenant.10-30.jpg
10.36Click on Apps to see all office applications assigned to the user.10-31.jpg

Wow! This was a longer journey through an extensive user provisioning scenario across SAP's and Microsoft's on-premise and cloud platforms! Hope you enjoyed it and worth spending your time. Let me know your thoughts and any open questions in the comments.

15 Comments
Sgemert
Explorer
0 Kudos

Great blog Martin, and nice work on the detailing.

 

I am working on a similair setup in which I am provisioning users from Entra ID to onprem S/4HANA.

As the CIS subject is still rather new to me I am trying to find out what is the best setup to use. You are pushing users from EntraID to CIS. As we do not have so much control over the customer Entra ID I have setup the EntraID as source and IAS as target so I can do my transformation in CIS. This gave me a challenge with the SAP ABAP username as it by default gets created with the EntraID login, which has an email and is too long. I managed to transform it to the P number of IAS, not very nice, but it works.

My latest challenge is that the user is created in S/4, the business partner is created, saml2 is working with CIS, but I am now faced with an initial password screen in my fiori login.

Do you know how to disable the password of a user when creating ABAP users from CIS?

 

Sgemert_0-1738224333167.png

thank you

Sander

Sgemert
Explorer
0 Kudos

I did some extra investigation, still a new user,  and found three options for my password issue.

1. set the profile param login/disable_password_logon to 3

2. use policies 

3. scim entry urn:ietf:params:scim:schemas:extension:sap:2.0:User passwordDetails status is disabled.

 

Option 1 will work but for now I cant predict the impact on the other users. So parked this one

Option 2 using policies I would want to push the policy with ips, but have not found out how

Option 3 I tried to implement, but am either strugling with the regex, or it is not possible to set status with the abap rfc.  Added this regex:
{
"targetPath": "$.PASSWORDDETAILS.STATUS",
"constant": "disabled"
}

Can option 3 work? The error I now get is


user:P000003,

system=S4publicAbap,

time=2025-01-30T09:16:37.112+00,

error=IDENTITY_MODIFY function returned response number 279 and errors: Enter a user name. ,

content={"ADDRESS":{"FIRSTNAME":"svguser02","LASTNAME":"jansen","TEL1_NUMBR":"888-888-8888"},"ADDSMTP":[{"E_MAIL":"svguser02@sgemert001.tst"}],"ADDTEL":[{"TELEPHONE":"888-888-8888"}],"ALIAS":{"USERALIAS":""},"DEFAULTS":{"LANGU":"E"},"LOCK":"U","LOGONDATA":{"TZONE":"CET"},"PASSWORDDETAILS":{"STATUS":"disabled"},"SAPUSER_UUID":{"SAP_UID":"d26230a1-2147-45b4-b12b-8c63f8b0c694"},"USERNAME":"P000003"}

dyaryura
Contributor
0 Kudos

Hi Martin

This is definitely huge news for people that have been struggling to integrate SAP with EntraID or IDM solutions. It's really awesome to know that SAP is making an important effort to integrate with standard protocols like SCIM to simplify provisioning.

What I think is missing is the big picture. I understand that this scenario works and someone might want to use for small scenarios, but I'd like to see something more architecture-oriented on these topics like:

    - Concept of "source system". in this case we have EntraID but some SAP customers might want to enrich IAS with attributes coming from other systems like SF. How this should be managed, what limitations do we have?

  - How should we organize this for bigger landscapes having multiple ABAP systems, SaaS solutions, etc. I see this hard to manage an monitor in big landscapes.

- I'm not sure if IAG will be at some point on top of this to play the role of IdM having interfaces to monitor synchronizations, reconcile, etc. IPS is great but is a "low-level" tool that pay the role of integrating but we need something on top to orchestrate the whole process. EntraID can play part of the role but we need some guidelines to organize the processes.

Thanks

Diego

MartinRaepple
Active Participant
0 Kudos

Hi @Sgemert ,

thank you for your feedback.

Regarding the use of "PASSWORDDETAILS" to deactivate the user's password, I don't see that field in BAPI_USER_CREATE1 (see also steps 9.13-9.16). 

Have you seen SAP Note https://me.sap.com/notes/0003115094 on this topic (How to create a user with deactivated password with the BAPI_USER_CREATE1)?

Haven't tried it myself yet, but seems like a possible solution.

HTH & best regards

Martin

Sgemert
Explorer
0 Kudos

Thank you Martin,

 

I used the SCIM 2 to find that PASSWORD DETAILS attribute, but it seems it does not work in the ABAp.

Based on that note, setting LOGONDATA  to X from IPS would than set the password disabled? Is that how I should interpret it?

thanks

Sander

Sgemert
Explorer
0 Kudos

I think I managed to disable the password now. Thanks Martin!

 

Added this transformation to the abap target connection

 

{
"targetPath": "$.LOGONDATA.CODVN",
"functions": [
{
"function": "copyMapEntry",
"sourceKey": "X",
"targetKey": "X"
}
],
"type": "set",
"defaultValue": "X"
}

gabi_maier_ethz
Explorer
0 Kudos

Dear @MartinRaepple

Fantastic blog!

Is it possible to provision (with rules/logic) groups in Entra ID to Identity Directory including their assignment to users? ... I seem to remember that you also mentioned something about the provisioning of the groups during the DSAG session last month...

Thank you
Gabi

MartinRaepple
Active Participant
0 Kudos

Hi @Sgemert,

thanks for posting your solution and great to hear that it works with $.LOGONDATA.CODVN.

Since the scenario in this blog post also aims to avoid password-based login, I will give it a try in my setup and enhance the blog post accordingly.

Thanks and regards

Martin

MartinRaepple
Active Participant
0 Kudos

Hi @gabi_maier_ethz ,

I can think of ways already today to create groups and assign users in SAP CIS Identity Directory from Entra, for example by calling the Identity Directory SCIM API from an Azure Logic App that hooks into the lifecycle events of the access packages. However, this requires custom coding and means code ownership/maintenance.

As mentioned on the DSAG session from January 16th, please stay tuned for enhanced capabilities in the SAP Cloud Identity Services SCIM connector in Entra.

Best regards

Martin

MartinRaepple
Active Participant
0 Kudos

Hi @dyaryura ,

thank you for your feedback. SCIM is definitely an important standard on both sides, and SAP and Microsoft support it across many components as seen in this scenario.

Regarding your question on the concept of "source system" and enrichment of attributes: In this scenario, Entra is the "leading" identity directory. Identites are created/updated/deleted here (either directly in the Entra ID tenant, through synchronization from on-prem, or via inbound provisioning from an external HR system, such as SF). This scenario also takes the architectual decision to centralize any attribute transformation logic in the Entra tenant. As an example, the user's SAP login name and SNC mapping are dynamically constructed with the mapping expressions in steps 6.17 to 6.19, and passed-through "as-is" by the IPS transformations. One could also decide to apply such transformation logic in IPS, but I'd always recommend to do this at a central place.

In one of the following parts of this series, I plan to take a closer look at the integration with SF. Again, Entra will stay in the role of the leading identity directory, and will therefore be configured for inbound provisioning from SF, and from there provision to CIS. We will also look at more complex attribute enrichment/transformation scenarios through custom extensions in Entra. Please stay tuned 😉

Following the reference architecure from SAP, it remains the responsibility of CIS/IPS to orchestrate provisioning to multiple ABAP systems and to SAP SaaS solutions.

Integration with IAG is also on our joint roadmap, and will play a central role in the provisioning process, e.g. to check for SOD violations before assiging a user to an access package in Entra ID Governance.

Hope that helps to answer (some of) your questions.

Best regards

Martin

FlorentTardivon
Discoverer
0 Kudos

Hello @Sgemert ,

You can do it simply by doing it like this normally : 

 {
"targetPath": "$.LOGONDATA.CODVN",
"constant": "X"
},

@MartinRaepple for the sncname you can do it in IPS too if you don't want to use the customAttributes which are sometimes used by SF and rather tricky to use.

Regards

evernite
Newcomer
0 Kudos

Hello @MartinRaepple,

Thanks for the very detailed setup instructions in your blog series. It's definitely very helpful.

It seems to me that the SAP Cloud Identity Services Enterprise Application from the gallery does not allow updating a Identity Directory User's Global User Id. The following provisioning attribute mapping is definitely not working for me:

SAP Cloud Platform Identity Authentication Service Attribute
Microsoft Entra ID Attribute
urn:ietf:params:scim:schemas:extension:sap:2.0:User:userUuidobjectId

although I am able to write the Entra User's objectId in a Identity Directory User's "Custom Attribute 1" (so the following mapping does work):
 

SAP Cloud Platform Identity Authentication Service Attribute
Microsoft Entra ID Attribute
urn:sap:cloud:scim:schemas:extension:custom:2.0:User:attributes:customAttribute1objectId

Just wanted to mention this just in case anyone else runs into this problem. 

markus_fugger_de
Explorer
0 Kudos

Hello @evernite , Hello @MartinRaepple ,

I did some tests with the Attribute urn:ietf:params:scim:schemas:extension:sap:2.0:User:userUuid as well. The attribute is shown in Entra when I provision a user on demand, but it is not stored in the IDS.
According to the documentation you should be able to provide a user_uuid with SCIM provisioning (2. graphic on the page):
https://help.sap.com/docs/cloud-identity/system-integration-guide/global-user-id-in-integration-scen... 

Maybe the schema urn:ietf:params:scim:schemas:extension:sap:2.0:User is not transfered at all? Because these two attributes were not working, too:
urn:ietf:params:scim:schemas:extension:sap:2.0:User:userId
urn:ietf:params:scim:schemas:extension:sap:2.0:User:sapUserName

The last one might be a better place to the SAP username than the customAttribute1 if it would be working. 

Regarding the SAP username:
You get a problem with ToUpper(Item(Split([onPremisesUserPrincipalName], "@"), 1), ) when the result is larger than 12 characters. You can use Left(ToUpper(Item(Split([onPremisesUserPrincipalName], "@"), 1) ) , 12), but you might get duplicate usernames for larger user bases then. 

Really looking forward to the provisioning of groups! Right the SCIM provisioning does not completely replace the provisioning with the IPS/GraphAPI. 

lambert-giese
Active Participant
0 Kudos

Excellent post Martin, it's super helpful. I noticed one small glitch: the GitHub URL in step 9.9. should point to SAPA4H_IPS.json , shouldn't it? While the displayed link text is correct, it actually points to the same LocalDirectory.json as 9.3. Maybe you wish to update the link target.

markus_fugger_de
Explorer
0 Kudos

Hello @MartinRaepple ,

The SCIM API that is used to connect Entra ID with SAP CIS is already deprecated:
https://api.sap.com/api/IAS_SCIM/ 

I tried to use its successor (https://api.sap.com/api/IdDS_SCIM), however you get an error because the namespace urn:ietf:params:scim:schemas:extension:enterprise:2.0:User is not working. 

For a new implementation I don't have a good feeling to use the deprecated version of the API. Do you know if/when the new version will be supported? 

Best regards,
Markus 

Labels in this area