Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
You need to complete the steps to deploy the Employee Self-Service agent before you can configure this supplemental extension pack.
Note
Learn more about setting up Microsoft Entra ID using SuccessFactors.
The Employee Self-Service agent is built on Copilot and uses AI to provide relevant information to employees and take actions on their HR data. If your organization uses a human resource management system, the Employee Self-Service agent requires access to that system to function most effectively.
Functional synopsis
The Employee Self-Service agent acts as a front-end for consuming information from SAP SuccessFactors. The following items are the scenarios currently supported by the Employee Self-Service agent for SAP SuccessFactors integration:
Employee read and write scenarios:
- Get Base Compensation
- Get Company Code
- Get Cost Center
- Get Hire Date
- Get Service Anniversary
- Get Employee ID
- Get Job Info
- Get Position Number
- Get Preferred Name
- Get Email
- Get National Id
- Update Veteran Info
- Update Race & Ethnicity
- Update Emergency Contact
- Update Phone
- Update Email
- Update Preferred Name
Manager read and write scenarios:
- Get directs Company code
- Get directs Cost Center
- Get directs Job Info
- Get directs Service Anniversary
- Update Cost Center
- Update Job Title
Technical synopsis
The diagram outlines the high-level components comprising overall solution for the Employee Self-Service agent and SuccessFactors integration. There are different activities to be performed as part of initial deployment and for an ongoing operation. As the solution involves multiple technologies, you should spend some time initially understanding the various components. Bring in the right stakeholders to set up an environment to deploy and test the Employee Self-Service agent.
Note
SuccessFactors integration is currently based on OData V2.0, but the latest supported version is V4.0. Microsoft Entra ID using SuccessFactors is still a prerelease version and is subject to change.
Prerequisites
- Setup SAP OData connector
- Admin access to SAP SuccessFactors (SF)
- Admin access within the Azure portal
You can refer to the Employee Self-Service agent deployment guide for subscription requirements for the Employee Self-Service agent.
Deployment role requirements
| Roles/Persona | Description | Activities performed | Configuration Areas |
|---|---|---|---|
| SAP SF Administrator | User performing administrative tasks. | 1. Create an OAuth 2.0 client application in SuccessFactors. 2. Upload the SAML certificate to OAuth 2.0 client application within SuccessFactors (SF). 3. Determine the API server where SF is hosted. 4. Confirm that maker account mapped in SAP SuccessFactors has OData API access. |
SAP SuccessFactors |
| Application Administrator (or) Cloud Application Administrator (or) Application Owner | User configuring single sign-on (SSO) integration. | 1. Establish a Microsoft Enterprise application. 2. Configure SAML settings within the Enterprise application. 3. Obtain the Enterprise application's SAML certificate. 4. Establish trust. |
Azure Admin portal |
| Environment Maker | User customizing the Employee Self-Service agent. | 1. Install and configure SAP SF extension pack. 2. Manage SAP SF topics. 3. Setup User Context. |
Microsoft Copilot Studio |
| InfoSec/IT Infra/Change Control Board | User committee responsible for security infrastructure changes. | Configure IT platform services such as network and firewall rules. | Network firewall policies |
Infrastructure setup for external system solution integration
Most enterprise organizations secure their third-party knowledge sources from external networks, as the line of business must protect sensitive information about employees, organizations, knowledge assets, and so on.
When you need to integrate these enterprise systems into the Employee Self-Service agent to use it as a source for providing relevant information to the end users, these systems should be accessible to the Power Platform environment hosting the Employee Self-Service agent.
These systems must be configured with allowlists for the source IP addresses from where the Employee Self-Service agent is hosted and executed, that is, Power Platform environment. For more information, see Power Platform URLs and IP address ranges - Power Platform.
For more information on third-party external system solution connectors, see Managed connectors outbound IP addresses.
For SAP SuccessFactors (SF) integration, as the Employee Self-Service agent uses OData v2.0, you need to work with InfoSec to allowlist Power Platform connectors to communicate with this endpoint. If any extra data security requirements need to be met, especially for OData exchange, work with your security specialists to harden the security for data in-transit.
Set up SSO for SAP SuccessFactors with Microsoft Entra
The following diagram is a high-level overview of the OAuth authentication process in SAP SuccessFactors:
You can ignore this step if SSO is already established for SAP SuccessFactors with Microsoft Entra.
Parameters for SuccessFactors connection
- SuccessFactors Token API
- SuccessFactors Client ID
- App Resource URI (
format: api://<App-ID>) - SuccessFactors OData Base URI
- Company ID - Represents the specific SuccessFactors environment for sign in.
Key configuration notes
- User mapping: Ensure that the Unique User Identifier claim of the Microsoft Entra ID user aligns precisely with the user alias in SuccessFactors (one-to-one matching).
- User access control: Only users or groups listed in the Enterprise application are allowed to authenticate SuccessFactors.
- Resource URI: Found in the Enterprise app settings under Expose an API as the application ID URI.
- Company ID: Based on the enabled SuccessFactors modules.
High-level overview
- Establish a Microsoft Enterprise application.
- Create an OAuth 2.0 Client Application in SuccessFactors.
- Configure SAML settings within the Enterprise application.
- Obtain the Enterprise application's SAML Certificate.
- Upload the SAML certificate to your OAuth 2.0 client application within SuccessFactors.
- Establish trust.
Create a Microsoft Entra ID Enterprise application
Open the Azure portal and go to Microsoft Entra ID > Enterprise applications.
Select New application.
Search for and select SAP SuccessFactors.
Assign a name for the application and select Create.
Go to Single sign-on and select SAML.
Follow specific guidelines in the SuccessFactors SSO Configuration Guide.
Configure the following settings:
- Identifier (Entity ID): Set to
api://<Enterprise App ID>(for example,api://33135bc6be6a-4cdc-9c96-af918e367425).
Note
We recommend you use the SF instance URL
https://<sfinstance>.successfactors.com.- Reply URL: Used in the SAML token as the Recipient field (for example,
https://<apiserver>/oauth/token).
Note
The claims process must have the information of which API server and where SF instance is hosted, for example if the SF instance is hosted in one of the API servers
api68sales.successfactors.com, then the URL should behttps://api68sales.successfactors/oauth/token. For more information on the SF documentation to determine the API server, see List of SAP SuccessFactors API Servers.- Sign-On URL: Advisable to set as
https://<your-sfurl>/sf/start?company=<CompanyID>&logonMethod=SSO.
Note
If the SF instance for Contoso Corporation is "Contoso" and the company ID is "CNTPART000100," the URL look like:
<https://contoso.successfactors.com/sf/start?company=CNTPART000100&loginMethod=SSO.- Identifier (Entity ID): Set to
Edit the attributes and claims section. You must come to this section only after completing the creation of OAUTH 2.0 Client application in SuccessFactors.
- Add a claim for "api_key" with the value of the API key from SuccessFactors.
- Update the Unique User Identifier claim to match the unique ID for each SuccessFactors user.
Note
Choose the correct name identifier format based on the user mapping between Microsoft Entra and SAP SuccessFactors. For example, if "Employee ID" is used as a sign in user ID for SAP SuccessFactors, then the mapping of source attribute should be the correct attribute from Microsoft Entra. Since this identifier is just an Employee ID without any email format, the Name identifier format should be set as Unspecified.
Download the Certificate (Base64 format) from this application. This information is required for completing the next step of creating an OAuth 2.0 client application in SuccessFactors. A certificate can be downloaded without completing the previous step. However, complete the OAuth 2.0 Client application setup in SuccessFactors to obtain the "api_key" required for the previous step.
Assign users and groups. Add all the users and/or groups required to access SAP SF via the Employee Self-Service agent under Users and groups section within Enterprise application's configuration for SAP SuccessFactors created in Microsoft Entra.
Create an OAuth 2.0 client application in SuccessFactors
Sign-in to the SuccessFactors Web UI with an admin account.
Go to Manage OAuth2 Client Applications.
Select Register Client Application.
Fill out the required fields:
- Company: Autopopulated.
- Application Name: Any descriptive name.
- Description: Any descriptive text.
- Application URL: Can be any random URL.
- X.509 Certificate: Copy/paste the certificate downloaded from step 9 in the previous section.
Note
The certificate file needs to be renamed as a text file to open in a text editor. Then, copy/paste the crypted characters without including the header and footer lines.
Select Save. The new client application now has an API Key that serves as Client ID in SAML2 session flow and can be used in the connection and Enterprise app configuration.
Configure Enterprise application
- In the Azure portal, go to App registrations and select SAP SuccessFactors application created in the previous section.
- Under Expose an API, locate Resource URI (Application ID URI).
- Select Add a client application.
- Enter the Client ID for SAP OData:
6bee4d13-fd19-43de-b82c-4b6401d174c3. - Select the existing scope from the Authorized scopes checklist.
- Select Add application.
- Navigate to Enterprise instance and add the users who need access to SF OData API.
Configure SuccessFactors to trust Microsoft Entra ID
- Sign-in to the SuccessFactors web UI with an admin account.
- Go to Manage OAuth2 Client Applications.
- Select the client application created earlier.
- Update the certificate to the one downloaded from Microsoft Entra ID and paste only the certificate body content without the header and footer.
Test the connection
- Open Power Automate in your browser.
- Create a new flow (manual trigger type).
- Add an SAP OData action.
- Select Microsoft Entra ID using SuccessFactors as the connection.
- Fill in the required parameters gathered earlier.
- Choose an Entity from the dropdown to test.
- Save your flow.
- Run the flow to test the connection.
- Verify the run history for successful authentication and data retrieval.
For more information on setting up SSO for SAP SuccessFactors with Microsoft Entra, see Set up Microsoft Entra ID using SuccessFactors.
Install SuccessFactors extension pack for the Employee Self-Service agent
The Employee Self-Service agent is designed to have separate extension packs for each third party external system solution, like SuccessFactors. As a result, these extension packs must be installed before starting any configurations or customizations.
These steps are required to install and enable the SuccessFactors extension pack:
Entitlement Work with your Employee Self-Service agent private preview product managers for the entitlement process. Once the entitlement process is complete for your tenant, the SuccessFactors extension pack shows up under Customize section of the Employee Self-Service agent.
Note
Entitlement process is a preview workaround until the extension pack installation is streamlined in Microsoft Copilot Studio.
Install the extension.
- Open the Employee Self-Service agent in Copilot Studio.
- Navigate to Settings.
- Select Customize from the left navigation under the Settings.
- Select Employee Self Service HR SuccessFactors and select Install.
- When prompted, update the connections as described by clicking "..." buttons on the right-hand side for each connection.
- The first connection is the user account, which should be automatically signed in.
- The second connection is for the OData API, which requires the following parameters to be configured.
Parameters to configure:
| Authentication Type | Microsoft Entra ID using SuccessFactors (Preview) |
|---|---|
| SuccessFactors token URL | SuccessFactors OAuth token endpoint URL (format: https://<api-server>/oauth/token) |
| Service Provider Client Id | SuccessFactors OAuth2 Client ID - the api_key |
| OData Base URI | Base URI for the OData service https://<api server>/odata/v2 |
| Microsoft Entra Resource URI or (Application ID URI) | Identifier used in Microsoft Entra ID to identify the target resource. Application ID URI configured in the Create Enterprise application section. |
| Company ID | Company ID |
Note
SAP SF OData connector uses maker connection, which is the SF API user credentials, in all flows to establish connection.
Set up Environment Variables
This section contains the environment variables for the SAP SuccessFactors instance you're integrating, based on your organization's operational policies.
The following table shows the list of variables and the purpose of each variable to be customized based on your organization's needs. We recommend you work with an SAP SuccessFactors subject matter expert to better understand the operational model.
| Environmental variable | Description |
|---|---|
| SuccessFactors_EC_Link | Variable stores the link, which gets used when update Topic is successful so the user can go on to Employee Central (EC) in SuccessFactors to check their updates. The default value is https://hcm41.sapsf.com/sf/start/ The default value needs to be changed to your organization's EC link. |
| SuccessFactors_EC_DisplayName | Variable stores the name to show the user for EC link. The default value is Employee Central. |
| SuccessFactors_RaceAndEthnicity_Countries | Variable stores the countries/regions that support the race and ethnicity Topic. The data type is Array. The default value is ["USA","GBR"] This variable is used in the Topic to validate the user is part of the country/region list using UserContext_Country_Code. |
| SuccessFactors_VeteranInfo_Countries | Variable stores the countries/regions that support the veteran info Topic. The data type is Array. The default value is ["USA","GBR"]. This variable is used in the Topic to validate the user is part of the country/region list using UserContext_Country_Code. |
| SuccessFactors_CostCenterSupport_Link | Variable stores the link used in the write cost center Topic as a support link when the user fails to input a valid cost center. |
Learn more about using environment variables in Power Platform solutions when following the steps to enter values for the environment variables while you're importing solutions.
Set up SuccessFactors extension pack for the Employee Self-Service agent
The SuccessFactors extension pack requires some initial setup for the agent flows and templates. The following sections walk you through the process for configuring the required components.
Setup User Context
This step is required to set the user context for the Employee Self-Service agent that primarily does the user mapping for Microsoft Entra and pass it on to SAP SuccessFactors.
Open the Employee Self-Service agent in Copilot Studio.
Go to Topics.
Select [Admin] - User Context - Setup.
In the canvas, select ...More and select </> Open code editor
Replace the existing code with the following code snippet:
kind: AdaptiveDialog beginDialog: kind: OnRedirect id: main priority: 0 actions: - kind: SetVariable id: setVariable_9CWZSL variable: Global.ESS_UserContext_UPN value: =First(Split(System.User.PrincipalName,"@")).Value - kind: BeginDialog id: mRTRN3 dialog: msdyn_copilotforemployeeselfservice.topic.SuccessFactorsSystemContextInitializerNote
The highlighted section in the code transforms username from the logged in user's principal name to SAP SuccessFactors user ID. Use this information based on your environment setup between Microsoft Entra and SAP SuccessFactors. Currently the agent supports only User Principal Name (UPN) as a key identifier, if there are other attributes to be used as key identifier then a custom logic should be implemented to get the correct username for SAP SuccessFactors.
Select Save for changes.
Set up templates
The Employee Self-Service agent comes with a few predefined templates used for each topic. These templates are shipped with the default data attribute paths, if there are custom entities and paths being used in SAP SuccessFactors, then these templates must be customized to match the SAP SuccessFactors entities.
To set up templates, follow these steps:
- Open The Employee Self-Service agent in Copilot Studio.
- Select Settings in the top right corner of agent ribbon.
- Select Customize from the agent settings left navigation pane.
- Select Employee Self Service HR SuccessFactors extension pack.
- Select Open from the dialog popup.
- Select Manage in the Configuration section.
- All of the template configurations are listed in Power Apps. Select each of the Get templates to configure the right entities and paths.
The following code shows an example of the Get configuration template:
{
"scenario": "HRSAPSuccessFactorsHCMEmployeeGetBaseCompensationAndCompaRatio",//Scenario name [OPTIONAL]
"rootEntity": "EmpEmployment",//Entity to be queried
"filter": "personIdExternal eq '{personIdExternalVal}' and userId eq '{userIdVal}'",//Filter Expression to filter data more on format below
"requestEntities": [ //Request entites an array of object that should be queried from root entity
{
"key": "CompaRatio",//Key Value
"valuePath": "compInfoNav/empCompensationCalculatedNav/compaRatio",//Path from root entity for value
"labelPath": "EmpCompensationCalculated/compaRatio"//Path from label $metadata to get label value
},
],
"permissionsMetadata": [ //Permission Metadata more on this in permisson loop
{
"permType": "DATA_MODEL", //Permision Type SF code value
"permLongValue": -1,
"permStringValue": "$_payCompGroup_AnnualizedSalary_read" //Permission string SF code value
}
]
}
The filter parameter keys must match what's expected in the Template configuration. In the following example, personIdExternalVal is used as a key to insert Global.ESS.UserContext.Employee_Id into the filter expression.
Example format used in Topic:
"{""personIdExternalVal"": """ & Global.ESS_UserContext_Employee_Id & """,""userIdVal"": """ & Global.ESS_UserContext_User_Id & """}"
Snippet of Template configuration:
{
...
"filter": "personIdExternal eq '{personIdExternalVal}' and userId eq '{userIdVal}'",
...
}
Similar to the Get Template configuration, the following section covers the Update Template configuration.
The following is an example of an update template configuration:
{
"scenario": "UpdateCostCenter",//[OPTIONAL] Scenario name
"requestBody": '{ //String data type request body. More below on how to format
"__metadata": { //metadata object with URI containing entity where insert happens
"uri": "EmpJob" //Entity used for insert
},
"userId": "userIdVal", //User Id value of user to update (This sometimes can be personIdExternal depending on Entity)
"startDate": "/Date(startDateVal)/", //Start Date field required for cost center update
"costCenter": "costCenterVal" //cost center field value
}',
"permissionsMetadata": [{ //Permission Metadata more on this in permisson loop
"permType": "DATA_MODEL", //SF data value permission type
"permLongValue": -1,
"permStringValue": "$_eventReason_DATACOST_write" //SF string value code for permission
}
],
"rolePermissions": [] //Different type of acceptable permission. Uses user roles to identify if user has role permissions
}
requestBody - var_requestParam is an array of objects
Example format used in Topic:
"[{""key"":""personIdExternalVal"", ""value"":"""&Global.ESS_UserContext_Employee_Id&"""}, {""key"":""countryVal"", ""value"":"""&First(Topic.var_parsedModel).country&"""},{""key"":""startDateVal"", ""value"":"""&DateDiff(Date(1970, 1, 1), First(Topic.var_parsedModel).startDate, TimeUnit.Seconds) * 1000&"""},{""key"":""genericString1Val"", ""value"":"""&Topic.id_raceAndEthnicity&"""}]"
Snippet from Template configuration:
{
"__metadata": {
"uri": "PerGlobalInfoUSA"
},
"personIdExternal": "personIdExternalVal",
"country": "countryVal",
"startDate": "/Date(startDateVal)/",
"genericString1": "genericString1Val",
}
The keys present in the var_requestParam must match what is expected in the Template configuration. In the previous example, personIdExternalVal is used as a key to insert Global.ESS_UserContext_Employee_Id into the request body.
Permissions and Role based permissions configuration
There are two permissions configurations that can be used. The permissions flow always use permissions metadata unless RoleBased permissions are provided in the config to choose it over permissions metadata.
Permissions config
The Permissions flow calls the OData connector with CheckUserPermission as its relative path and permissionMetadata in the config as the queryString. OData connector then returns a true or false value dictating if the user has permission or not to the "Get" flow.
{
..
"permissionsMetadata": [
{
"permType": "DATA_MODEL", //Permision Type SF code value
"permLongValue": -1,
"permStringValue": "$_payCompGroup_AnnualizedSalary_read" //Permission string SF code
value
}
]
..
}
Role based permissions config
Role based permissions use the roleId provided in the config to check against UserRoles variable that is part of the user context. The flow queries RBPRole with roleId given in configuration, which returns all the permissionStringValues linked to the roleId. Then it matches the permStringValue in the config to what the OData connector returned. Manager scenarios are required to use RBP role because we check if the manager has permissions for multiple users at the same time and therefore using PermissionsMetadata would be slower. In this case, we can check that the user has 115 role, which gives them permission to make changes for directs. The maker must create the Role ID if the current SF implementation doesn't have it.
{
..
"rolePermissions": [
{
"roleId": "115", //Role ID code from SF to query for
"permissions": [
{ "permStringValue": "$_employmentInfo_originalStartDate_read" } //Permission string to
check for in role id
]
}
]
..
}
User Context flow - High-level logic
- Setting a variable with the filter parameters, which in this case is the alias of the user the context is retrieved for.
- Next split into parallel calls to reduce time:
- The left side retrieves the user context config in the first Dataverse call. The second Dataverse call retrieves the filter and request entities, which we query for in the OData connector at the end. After the left side is complete, the flow retrieves all the requested entities from the config for the user.
- The right side retrieves the config to check if user isManager in the first Dataverse call. The second Dataverse call flow retrieves the filter and request entities to query for. With that config, the flow queries for the user's direct reports and retrieves necessary information such as in this case userId of directs.
- If the SF call for user data doesn't return anything, we terminate the flow and respond to copilot user not found.
- We split into parallel calls to check if the user has multiple records on the left.
- The left side checks if there are multiple records and then runs a child flow that gets the active user ID and updates the context. Then the flow makes an OData call to get the user's roles by their user ID.
- The right-side checks for open positions if the user is a manager and IsManagerCheckVacantPositions is set to "True". It makes Dataverse calls to get the necessary configs to make the SF OData request and then updates the IsManager variable.
- Finally, the flow composes an object with all the required user context fields and returns it to Copilot Studio (CPS).
Read flow - High-level logic
Input variables required:
- loggedInUserId: alias
- scenarioName: Config Name, example:
msdyn_HRSAPSuccessFactorsHCMEmployeeGetNationalId - userLocale: en_US
- targetUserId: alias
- filter: {"personIdExternalVal": "123456"}
- userRoles: ["123", "345"]
The flow retrieves the config using the scenarioName variable and in parallel prepares the filter query.
The flow retrieves the data and label entities from the config using Dataverse plugin.
The flow calls a child flow to check permissions by passing the userRoles, alias, and config.
If the permission flow returns false, then the flow terminates and responds to Copilot that user doesn't have permissions.
The flow then, in parallel, makes OData calls for the entity data and the labels.
To get the labels first, the flow checks if there are any labels to query in the config, and then prepares the needed variables.
The flow queries the SF OData metadata entity using the values collected earlier from the config. Due to the response being metadata, the flow does some manipulation to get the data into key value pairs.
Finally, it returns three variables, such as labelResponse, modelResponse, and isSucceeded.
Troubleshooting
SAP SF Single Sign-on issues with Microsoft Entra
Prerequisites for troubleshooting:
- Client tool for testing and managing APIs like Postman, Bruno, and so on.
- Access to https://samltool.io.
- Basic knowledge in how the authentication flow works especially with SAML.
Use the API client tool for testing, validating, and confirming the assertion being generated and passed to SF. For more instructions, see 3462403 - SuccessFactors OData API: OAuth 2.0 Authentication.
The following highlighted items are the critical pieces of information to be validated as part of claims authentication:
<NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">- Ensure that the correct NameID format is used for user mapping between Microsoft Entra and SAP SF.<Attribute Name="api_key">- Ensure that the claims token has the correct api_key from SAP SF OAuth 2.0 client application created.