Attribute Mapping references

  • Release version: Yokohama
  • Updated January 30, 2025
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Attribute Mapping references

    The Attribute Mapping feature in ServiceNow enables you to define how SCIM (System for Cross-domain Identity Management) attributes correspond to ServiceNow table fields. This mapping acts as a single source of truth for resource attributes, facilitating accurate synchronization and integration between SCIM providers and ServiceNow data structures.

    Show full answer Show less

    Key Features

    • Attribute and Sub-Attribute: Define the main attribute (e.g., userName) and optionally a sub-attribute (e.g., name.familyName). For simple attributes without sub-components, sub-attribute is set to None.
    • Filter Condition: Supports filtering multi-valued attributes based on specific criteria (such as type eq "mobile" for phone numbers). Filter conditions use schema definitions from the SCIM provider to select the correct attribute instance.
    • Database Field Name: Maps a SCIM attribute directly to a ServiceNow table field. This can include dot-walking to nested fields (e.g., mapping a SCIM department attribute to the user's department name). This establishes the exact ServiceNow field that corresponds to the SCIM attribute.
    • Default Value: Specifies a fallback or hard-coded value when the direct mapping returns null. Setting the database table and field name to None allows for fixed values, such as marking a work email as primary by default.
    • Script: Enables custom logic to fetch or transform attribute values. Scripts must return a string or a JSON string in the expected format for the SCIM provider. Scripts can handle both simple and multi-valued attributes by producing appropriately formatted string outputs.

    Practical Application for ServiceNow Customers

    By leveraging Attribute Mapping, ServiceNow customers can precisely control how user and resource data from SCIM providers integrate into their ServiceNow tables. This ensures data consistency, supports complex attribute structures, and allows customization through filtering and scripting. The feature simplifies identity management workflows and enhances interoperability between ServiceNow and external identity providers.

    The attribute mappings enables you to use the attributes as a single source of resource to the ServiceNow table fields.

    Attribute

    The attribute for which mapping needs to be defined. For example, userName.

    Attribute - userName

    Sub-Attribute

    Select the sub-attribute, if any, for which a mapping needs to be defined.

    For example, if there is a complex type attribute like name.familyName, then the attribute is name and the sub-attribute is familyName.

    For simple attributes like user name, the Sub-Attribute value would be None.

    Attribute Name and Sub-Attribute Family Name

    Filter Condition

    A multi-valued attribute can have additional information that can be specified by using a Filter Condition. The choices for the filter condition are populated using the schemas defined by the SCIM Provider.

    For example, the phoneNumbers attribute has multiple types like work, mobile, home, and so on.

    You can specify a Filter Condition from a set of possible values. For example, the phoneNumber attribute can have the Filter Condition as type eq "mobile".

    Attribute Phone Number with Filter Condition Mobile

    The phoneNumber attribute can instead have a Filter Condition as type eq "work".

    Attribute Phone Number with Filter Condition Work

    Database Field Name

    If the direct attribute mapping option is chosen, then this attribute needs to be defined. The Database Field Name field represents the ServiceNow field name that is mapped with the SCIM Attribute.

    For example, the username SCIM Attribute can be mapped to a user as the Database Table Name field, and to the user ID field as the Database Field Name field.


    Database Field Name

    You can also dot-walk using the Database Field Name. For example, the department SCIM Attribute can be mapped to the Department Name field.

    Attribute - Dot walk

    Here the Database Table is User and the Database field Name is Department Name.

    Attribute - Department Name

    Default Value

    The default value is passed to the SCIM Provider if direct attribute mapping of that field returns null. The default value can also be used to return a hard-coded value.

    In the case of a hard-coded value, the database table name and field name should be None.

    For example, the primary sub-attribute value of work email can be hard coded as true.

    Attribute Default Value

    Script

    The script is used to fetch the attribute value. The return type of the script should be always a string, or a JSON converted as a string. The output of the script should be in the proper format as expected by the provider for that attribute.

    The following is a sample script for a multi-valued attribute.

    Attribute Script

    The output of the script should have a stringified JSON Array.

    The following is a sample Script of a simple-valued Attribute.

    Attribute Employee Number - Run script

    The output of the script should be a string.