Introduction
An LDAP integration allows your instance to use your existing LDAP server as the master source of user data.
Directory service
A directory service is like electronic telephone book that stores information of user.
LDAP
LDAP or lightweight directory access protocol is a communications protocol that fetches user information from a directory service. The information is stored in the form of a tree as shown below
Where
• CN = Common Name
• OU = Organizational Unit
• DC = Domain Component
• DN = Distinguish Name
• RDN = Relative distinguished name
• SN = Sur Name
So for example, to identify user Mango King in the above example we have to right
This lines tell that
- The (CN) “common name” of the user is Mango King
- He belongs to people (OU) “organization unit”
- He belongs to SAP domain (DC)
- SAP domain parent domain is nctucs(DC)
- Nctucs parent domain is net (DC)
The object class corresponding to mango king user holds other attributes like firstname lastname telephone etc.
LDAP ServiceNow Integration
SNOW can contact with LDAP server to gather user/group related information. It can collect this information via MID server or directly query the LDAP server. So in the as shown in the diagram below
- We have to create a LDAP server providing the LDAP url
- Create Data source and import set
- Create a transform Map to Map the LDAP properties with user/group table in SNOW
Use Case
- For our example we will use a free LDAP server hosted in the below site https://www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server/
- Type LDAP in the left pane and go LDAP server >Create new server
- In the right pane, give a name of the ldap connection
- Once saved, this will open up the LDAP form in detail as shown below
- If we scroll down we can see below options We can click on Test Connection to verify if the connection is fine We can also traverse the DIT by clicking browse Further down the form we can see the list of OU that SNOW have identified after test connection is successful
- Click on User and got to the detail page for this User OU
- create a new data source in the next window
- To create the transform map, Load 20 records and click on create transform map as usual
- Scroll down click on Mapping assist
- Now for demo purpose remove all the mapping fields and keep only two fields say last name and ID as below
If any one of the properties are missing and coalesce is on for the table mapping, then we will get exception.
For example: By default, when we create ldap data source the transform map will have coalesce on for
- So in case this field is not present in the LDAP server properties, it will throw an error as below
- So we have to see properties available both in staging table and target table correctly. Remove/add element based on that from the map
- Best option is to check available methods exposed by the ldap server properties. In real-world scenario we can ask the LDAP administrator to enable/disable properties that we want to map in snow
Include script
Here we will do one more thing, we will use script import option to update the last name field based on the data that is there in the staging table
For example
If name of the person is “Einstein” we will update his last name with “superman” and for rest of the user we will update with normal last name with uid as received from the LDAP server
To do this we have to right a small condition script
Whenever we are doing transformation “source” is the staging table and “target” is the destination table.
So here we are going check if the uid property of the staging table is newton
If yes, return "super human"
Else return "uid" itself
To create a scripted transform map field we have check the use script checkbox And finally map the Target field as last name
Run the Load all records now Now let’s see the target table and check if for Einstein we have “superman” in the last name
Question : If LDAP server user becomes inactive, how to make user inactive in ServiceNow?
In LDAP ,the userAccountControl property is used to make user active/inactive. So we can write script to check if the userAccountControl property is 512 or not, and based on that update the active field in user table
- Understanding Request, RITM, Task in ServiceNow
- Steps to create a case in ServiceNow (CSM)
- Performance Analytics in 10 mins
- Event Management in 10 minutes - part1
- Event Management in 10 minutes - part2
- Custom Lookup List
- Script includes in 5 minutes
- Interactive Filter in 5 minutes
- UI Policy in 6 Minutes
- Client Side Script Versus Server Side Script in 3 minutes
-
Snow
- Performance Analytics
- ServiceNow Scripts
- Script include
- Useful scripts
- Basic Glide Scripts
- Client Script
- Advance Glide Script
- Glide System Script
- Admin
- Import Set
- Work Flow
- ACL
- SLA
- Notification
- Core Application
- UI Policy
- UI Action
- Client Script
- CAB Workbech
- Data Policy
- Connect Support
- Catalog
- Discovery
- CSM
- Event Management
- HR
- Integrations
- SSO Integration
- LDAP Integration
- SCCM Integration
- AWS Intergration
- Slack Integration
- CTI Integration
- Jira Integration
- Ebonding ServiceNow
- SOAP Integration
- IBM Netcool Integration
- VIP Mobile App Integration
- Rest Integration
- Service Portal
- Questions
- ACL
- Performance analytics(PA) Interactive Filter
- Various Configurations in Performance analytics(PA)
- Service Portal
- Performance Analytics(PA) Widgets
- Performance Analytics(PA) Indicator
- Performance Analytics(PA) Buckets
- Performance Analytics(PA) Automated Breakdown
- Client Script
- Rest Integration
- Understanding the Request, RITM, Task
- Service Catalogs
- Events in ServiceNow
- Advance glide script in ServiceNow
- CAB Workbench
Comments