Adding Claim Mapping¶
You can add new claim mapping to an existing claim dialect (see the Configuring Claim Dialects page for configuring dialects). You can add either a new local claim, or an external claim:
- Add Local Claim - Follow the steps in this section to add a new claim to the https://wso2.org/claims (local) claim dialect.
- Add External Claim - Follow the steps in this section to add a new claim to any claim dialect other than the local (https://wso2.org/claims) dialect. To do this, map the relevant local claim from the local claim dialect ( https://wso2.org/claims).
Add local claim¶
- Sign in to the Management Console by entering your username and password.
- In the Main menu, click Add under Claims.
-
Click Add Local Claim to add a new claim to the https://wso2.org/claims (local) claim dialect.
-
Enter the required information.
See the following table for descriptions of these fields.
-
Click on the Add button.
- A new claim mapping is displayed in the list.

Add external claim¶
- Sign in to the Management Console by entering your username and password.
- In the Main menu, click Add under Claims.
- Click Add External Claim to add a new claim to any existing dialect other than the local dialect, i.e, https://wso2.org/claims.
- Select the Dialect URI of the dialect you want to add the claim
to and enter the required information.
- External Claim URI: This is the URI defined under the dialect, specific to the claim. There are different URIs available in the Identity Server and these equate to user attributes displayed in the profile of users. These URIs are mapped to local claims in the https://wso2.org/claims dialect which are in turn mapped to the the relevant attributes in the underlying user store.
- Mapped Local Claim: This is the claim that is defined in the local claim dialect ( https://wso2.org/claims ) that is mapped to the relevant attribute in the underlying user store.
- Click on the Add button.
Note
Alternatively, you can also add a claim mapping using the configuration file instead of via the management console. To do this,
-
Open the
claim-config.xmlfile found in the<IS_HOME>/repository/conf/folder and add the necessary claim mapping under the relevant claim dialect.Sample claim mapping
<Claim> <ClaimURI>country</ClaimURI> <DisplayName>Country</DisplayName> <AttributeID>country</AttributeID> <Description>Country name component</Description> <MappedLocalClaim>http://wso2.org/claims/country</MappedLocalClaim> </Claim> -
Save the file and restart the server.
The claims configured in <IS_HOME>/repository/conf/claim-config.xml file get applied only when you start the product for the first time, or for any newly created tenants. With the first startup, claim dialects and claims will be loaded from the file and persisted in the database. Any consecutive updates to the file will not be picked up and claim dialects and claims will be loaded from the database.

