- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2024 08:50 AM
In our recent project, we faced a specific use case where our customer wanted to import few user records from ServiceNow into Okta. However, we encountered a challenge, using the standard import function in Okta's admin panel, clicking on "Import Now" would pull all users from the user table, which was undesirable. Our goal was to import only the vendor-specific users into Okta.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2024 08:56 AM
Solution: Rest API Integration for Targeted User Import
To address this, I implemented a REST API integration that allows us selective import of users from ServiceNow to Okta. Here's how I did it:
Steps to Import Users to Okta using REST Integration
- Endpoint Configuration:
- Use the following endpoint to integrate with Okta:
- request.setEndpoint('https://{yourOktaDomain}/api/v1/users?activate=true');
- Ensure you replace {yourOktaDomain} with your actual Okta domain.
- Authentication:
- Generate an API token in Okta to authenticate your requests:
- request.setRequestHeader('Authorization', 'SSWS {yourOktaAPIToken}');
- Scripted REST API in ServiceNow:
- To ensure the integration runs automatically, I have created a business rule in ServiceNow that triggers this REST API whenever the title field of user table is changed to "vendor."
- Create a Scripted REST API in ServiceNow to fetch users with title “vendor and send it to Okta. Below is an example of how you can achieve this:
var requestBody = {
profile: {
firstName: userFirstName,
lastName: userLastName,
email: userEmail,
login: userEmail
}
};
Key Benefits
- Selective Import: This approach ensures only specific user records are imported into Okta, aligning with the customer's requirements.
- Automation: The integration automates the import process, reducing manual effort and minimizing errors.
- Customization: The solution can be tailored to meet specific needs, such as adding additional user table attributes or modifying the import logic.
By leveraging this custom integration, I was able to provide a seamless and efficient solution for our customer, ensuring their vendor specific user records in Okta are accurate and up to date.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2024 08:56 AM
Solution: Rest API Integration for Targeted User Import
To address this, I implemented a REST API integration that allows us selective import of users from ServiceNow to Okta. Here's how I did it:
Steps to Import Users to Okta using REST Integration
- Endpoint Configuration:
- Use the following endpoint to integrate with Okta:
- request.setEndpoint('https://{yourOktaDomain}/api/v1/users?activate=true');
- Ensure you replace {yourOktaDomain} with your actual Okta domain.
- Authentication:
- Generate an API token in Okta to authenticate your requests:
- request.setRequestHeader('Authorization', 'SSWS {yourOktaAPIToken}');
- Scripted REST API in ServiceNow:
- To ensure the integration runs automatically, I have created a business rule in ServiceNow that triggers this REST API whenever the title field of user table is changed to "vendor."
- Create a Scripted REST API in ServiceNow to fetch users with title “vendor and send it to Okta. Below is an example of how you can achieve this:
var requestBody = {
profile: {
firstName: userFirstName,
lastName: userLastName,
email: userEmail,
login: userEmail
}
};
Key Benefits
- Selective Import: This approach ensures only specific user records are imported into Okta, aligning with the customer's requirements.
- Automation: The integration automates the import process, reducing manual effort and minimizing errors.
- Customization: The solution can be tailored to meet specific needs, such as adding additional user table attributes or modifying the import logic.
By leveraging this custom integration, I was able to provide a seamless and efficient solution for our customer, ensuring their vendor specific user records in Okta are accurate and up to date.