how to integrate sailpoint with servicenow to create requests

Thereza Van der
Tera Contributor

Good day everyone

 

I have a request to integrate Sailpoint with ServiceNow so they can automatically log requests in ServiceNow. I read up about it but have no clue what to do. I created a user so long and I tried to setup a REST API but not sure I know what I am doing.

 

ANY assistance/guidance would be appreciated please.

 

 

Regards

Thereza

3 REPLIES 3

Shaqeel
Mega Sage

Hi @Thereza Van der

 

Don't worry! 

Follow these steps.

 

1. SET UP SAILPOINT

Make sure you have necessary API access and permissions in SailPoint.

Obtain the API endpoint and authentication details (e.g., client ID, client secret).

 

 

2.SET UP SERVICENOW

Create a REST Message:

Navigate to System Web Services > Outbound > REST Message.
Click New to create a new REST message for SailPoint.
Configure the REST message with the necessary SailPoint API endpoint and authentication details.
Create an Integration User:

Create a user in ServiceNow that will be used for the integration.
Assign appropriate roles to this user.

 

3.DEVELOP A SCRIPTED API IN SERVICENOW

Navigate to: System Web Services > Scripted REST APIs.

Click: New.

Define the API:

Name: SailPoint Integration API
API ID: sailpoint_integration
Set up resources for the API to handle different types of requests.
Create Resources and Scripts:

Define resources that handle the creation of requests in ServiceNow.
Write scripts to handle incoming data, authenticate with SailPoint, and create requests.
Example Script for a Scripted REST Resource

(function process(/*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) {
    var requestBody = request.body.data;
    var userId = requestBody.userId;
    var accessRequest = requestBody.accessRequest;

    // Call SailPoint API to validate or process the request
    var restMessage = new sn_ws.RESTMessageV2('SailPoint API', 'post');
    restMessage.setRequestBody(JSON.stringify({
        userId: userId,
        accessRequest: accessRequest
    }));

    var response;
    try {
        response = restMessage.execute();
        var responseBody = response.getBody();
        var httpStatus = response.getStatusCode();
        
        // Check the response and handle it
        if (httpStatus == 200) {
            // Create a request in ServiceNow
            var gr = new GlideRecord('sc_request');
            gr.initialize();
            gr.requested_for = userId;
            gr.short_description = 'Access request from SailPoint';
            gr.description = accessRequest;
            var requestId = gr.insert();

            // Send response back
            response.setStatus(200);
            response.setBody({ result: 'Request created', requestId: requestId });
        } else {
            response.setStatus(httpStatus);
            response.setBody({ error: 'Failed to process the request' });
        }
    } catch (ex) {
        response.setStatus(500);
        response.setBody({ error: ex.message });
    }
})(request, response);

 

4.SET UP WORKFLOW IN SERVICENOW

Create a Workflow:

Navigate to Workflow > Workflow Editor.
Create a new workflow that handles the creation of access requests from SailPoint.
Define the workflow steps, such as approval processes and task assignments.
Trigger the Workflow:

Set up conditions to trigger the workflow when a request is created by the SailPoint integration.

 

 

5.TEST THE INTEGRATION

Use a tool like Postman to send a test request to the ServiceNow scripted REST API.
Ensure that the request is processed correctly and that a request is created in ServiceNow.

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Shaqeel

 


***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.

***********************************************************************************************************************





Regards

Shaqeel

Thereza Van der
Tera Contributor

Thanks Shaqeel

 

I will give a thumbs up and accept as solution as soon as I get it working. Thanks for the thorough instructions.

Sumanth16
Kilo Patron

Hi @Thereza Van der , 

Integrating SailPoint with ServiceNow involves setting up a bi-directional integration to synchronize access-related request items between the two systems. Here are the steps to achieve this integration:

1. Identify integration requirements: Understand the specific integration requirements, including the data to be synchronized, the triggering events, and any additional business rules or transformations needed during the integration process.

2. Configure ServiceNow outbound integration: In ServiceNow, set up an outbound integration to send access-related request items to SailPoint. This integration can be achieved using ServiceNow's integration features like RESTful APIs, web services, or MID Servers. You'll need to define the appropriate payload and authentication mechanism to securely communicate with SailPoint.

3. Configure SailPoint inbound integration: In SailPoint, configure an inbound integration to receive access-related request items from ServiceNow. SailPoint provides various integration options such as RESTful APIs, web services, or connectors specific to ServiceNow. Determine the necessary authentication and authorization mechanisms for the integration.

4. Define mappings and transformations: Determine the data mappings and transformations required between ServiceNow and SailPoint. This step ensures that the data sent from ServiceNow aligns with SailPoint's data model and requirements. Define mappings for attributes such as user information, access requests, approvals, and fulfillment status.

5. Implement request item creation in SailPoint: When an access-related request item is created in ServiceNow, the outbound integration configured in Step 2 will trigger and send the request data to SailPoint. In SailPoint, develop the necessary logic to receive and process the request item. This includes creating a corresponding request item in SailPoint and handling any validations or business rules specific to your environment.

6. Implement fulfillment and update in ServiceNow: After the request item is approved and fulfilled in SailPoint, use SailPoint's integration capabilities to send the fulfillment status and any relevant information back to ServiceNow. Configure the inbound integration in ServiceNow to receive these updates and update the corresponding request item's status and any other relevant information.

7. Test and monitor the integration: Conduct thorough testing of the integration to ensure the data synchronization is functioning as expected. Monitor the integration for any errors, failures, or performance issues and implement appropriate logging and monitoring mechanisms.

8. Handle error scenarios and exceptions: Define error handling mechanisms to address scenarios where data synchronization fails or encounters errors. Implement appropriate logging, error notifications, and exception handling processes to ensure visibility and timely resolution of integration issues.

It is worth mentioning that the specific steps and configurations may vary depending on the versions and specific configurations of SailPoint and ServiceNow that you are using. It is recommended to refer to the documentation and resources provided by both systems for detailed instructions and guidelines on integration. Additionally, involving experienced integration specialists or consultants can help ensure a smooth and successful integration between SailPoint and ServiceNow.

Please refer below thread:

https://www.servicenow.com/community/product-launch-forum/servicenow-to-sailpoint-data-integration/t...

 

Mark the comment as a correct answer and also helpful once worked.

 

Thanks & Regards,
Sumanth Meda