You can view and manage the user mapping for the name ID using the Token Attribute Rule REST API.
 
  
  
   The cURL command examples use the URL structure:
   
http://host:port/wsm-pmrest/v2/trust/{aTrustDocName}/attributerule/{anIssuerName}/{anIdentifier}/nameid/mapping
    
   
  
  
  The following use case shows you how to:
 
   
   -  
Map the user attributes
   
   -  
View the user attributes mapping
   
   -  
Modify the user attribute mapping
   
   -  
Delete the user attribute mapping
   
  
 
  To manage the user attribute mapping using the Token Attribute Rules Rest API:
 
   
  
  
  - Specify the headers on the cURL command line:
   
 
    -H Accept:application/json
 
       
  - Map the user attribute to the name ID for the token attribute rule (Identifier 
myidentifier1 and Issuer Name www.abccompany.com) by running the following command:
    
    curl -i -X POST -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustdocumentName}/attributerule/{issuername}/{identifier}/nameid/mapping 
    Example
 
    curl -i -X POST -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/attributerule/www.abccompany.com/myidentifier1/nameid/mapping
 
    See Create the NameIdMapping. 
 
    
     The following shows an example of the request body:
     
{
  "userAttribute": "val1",
  "userMappingAttribute": "userMappingattr1"
}
      
    The following shows an example of the response indicating the request succeeded.
 
    {
  "STATUSCODE": "20141",
  "MESSAGE": "Mapping for Attribute/NameId \"OrgTrustedUser\" is successfully created."
}
 
       
  - Change the user attribute name to 
Org and user mapping attribute to userMappingOrg for the name ID by running the following command:
    
    curl -i -X PATCH -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustdocumentName}/attributerule/{issuername}/{identifier}/nameid/mapping 
    Example
 
    curl -i -X PATCH -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/attributerule/www.abccompany.com/myidentifier1/nameid/mapping
 
    See Update the NameIdMapping. 
 
    The following shows an example of the request body.
 
    {
  "userAttribute": "Org",
  "userMappingAttribute": "userMappingOrg"
}
 
    The following shows an example of the response indicating the request succeeded.
 
    {
  "STATUSCODE": "20142",
  "MESSAGE": "Mapping for Attribute/NameId \"OrgTrustedUser\" is successfully updated."
}
 
       
  - View the user attribute and user mapping attribute for the name ID of the token attribute rule (Identifier 
myidentifier1 and Issuer Name www.abccompany.com) by running the following command:
    
    curl -i -X GET -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustdocumentName}/attributerule/{issuername}/{identifier}/nameid/mapping 
    Example
 
    curl -i -X GET -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/attributerule/www.abccompany.com/myidentifier1/nameid/mapping
 
    See Get the NameIdMapping. 
 
    The following shows an example of the response indicating the request succeeded.
 
    {
  "userAttribute": "Org",
  "userMappingAttribute": "userMappingOrg"
}
 
       
  - Optionally, delete the user attribute and user mapping attribute for the name ID of the token attribute rule (Identifier 
myidentifier1 and Issuer Name www.abccompany.com) by running the following command:
    
    curl -i -X DELETE -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustdocumentName}/attributerule/{issuername}/{identifier}/nameid/mapping 
    Example
 
    curl -i -X DELETE -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/attributerule/www.abccompany.com/myidentifier1/nameid/mapping
 
    See Delete the NameIdMapping. 
 
    The following shows an example of the response indicating the request succeeded.
 
    {
  "STATUSCODE": "20144",
  "MESSAGE": "Mapping for Attribute/NameId \"OrgTrustedUser\" is successfully deleted"
}