---
title: Configuring attribute mapping
description: The following procedure defines an attribute map from the email attribute in the source servers to a mail attribute in the target servers. Both attributes must be valid in the target servers and must be present in their respective schemas.
component: pingdirectory
version: 11.0
page_id: pingdirectory:pingdatasync_server_administration_guide:pd_sync_config_attribute_mapping
canonical_url: https://docs.pingidentity.com/pingdirectory/11.0/pingdatasync_server_administration_guide/pd_sync_config_attribute_mapping.html
revdate: September 13, 2023
section_ids:
  about-this-task: About this task
  steps: Steps
---

# Configuring attribute mapping

## About this task

The following procedure defines an attribute map from the `email` attribute in the source servers to a `mail` attribute in the target servers. Both attributes must be valid in the target servers and must be present in their respective schemas.

|   |                                                                                                                                                                                                                                                                                                                                              |
| - | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | The following can also be done with `dsconfig` in interactive mode. The attribute mapping *(tooltip: \<div class="paragraph">&#xA;\<p>Matching corresponding attributes between an IdP and an SP to identify federated users or add supplemental user information.\</p>&#xA;\</div>)* options are available from the PingDataSync main menu. |

## Steps

1. On PingDataSync, run the `dsconfig` command to create an attribute map for the "SunDS>DS" Sync Class for the "Sun DS to Ping Identity DS" Sync Pipe, and then run the second `dsconfig` command to apply the new attribute map to the Sync Pipe and Sync Class.

   ```shell
   $ bin/dsconfig --no-prompt create-attribute-map \
     --map-name "SunDS>DS Attr Map" \
     --set "description:Attribute Map for SunDS>Ping Identity Sync Class" \
     --port 7389 \
     --bindDN "cn=admin,dc=example,dc=com" \
     --bindPassword secret
   ```

   ```shell
   $ bin/dsconfig --no-prompt set-sync-class-prop \
     --pipe-name "Sun DS to DS" \
     --class-name "SunDS>DS" \
     --set "attribute-map:SunDS>DS Attr Map" \
     --port 7389 \
     --bindDN "cn=admin,dc=example,dc=com" \
     --bindPassword secret
   ```

2. Create an attribute mapping (from `email` to `mail`) for the new attribute map.

   ```shell
   $ bin/dsconfig --no-prompt create-attribute-mapping \
     --map-name "SunDS>DS Attr Map" \
     --mapping-name mail --type direct \
     --set "description:Email>Mail Mapping" \
     --set from-attribute:email \
     --port 7389 \
     --bindDN "cn=admin,dc=example,dc=com" \
     --bindPassword secret
   ```

3. For a bidirectional deployment, repeat steps 1–2 to create an attribute map for the DS>SunDS Sync Class for the Ping Identity DS to Sun DS Sync Pipe, and create an attribute mapping that maps `mail` to `email`.

   ```shell
   $ bin/dsconfig --no-prompt create-attribute-map \
     --map-name "DS>SunDS Attr Map" \
     --set "description:Attribute Map for DS>SunDS Sync Class" \
     --port 7389 \
     --bindDN "cn=admin,dc=example,dc=com" \
     --bindPassword secret
   ```

   ```shell
   $ bin/dsconfig --no-prompt set-sync-class-prop \
     --pipe-name "Ping Identity DS to Sun DS" \
     --class-name "DS>SunDS" \
     --set "attribute-map:DS>SunDS Attr Map" \
     --port 7389 \
     --bindDN "cn=admin,dc=example,dc=com" \
     --bindPassword secret
   ```

   ```shell
   $ bin/dsconfig --no-prompt create-attribute-mapping \
     --map-name "DS>SunDS Attr Map" \
     --mapping-name email \
     --type direct \
     --set "description:Mail>Email Mapping" \
     --set from-attribute:mail \
     --port 7389 \
     --bindDN "cn=admin,dc=example,dc=com" \
     --bindPassword secret
   ```
