This documentation is for WSO2 Identity Server 5.2.0. View documentation for the latest release.
Managing Claims with APIs - Identity Server 5.2.0 - WSO2 Documentation
||
Skip to end of metadata
Go to start of metadata

The Claim Management component of WSO2 Carbon allows you to map a set of attributes from the underlying user store to a set of defined claims. This section guides you through invoking and working with the RemoteClaimManagerService and the operations you can work with in this service.

Invoking the admin service

The RemoteClaimManagerService is an admin service of the WSO2 Carbon platform. As admin services are secured to prevent anonymous invocations, you cannot view the WSDL of the admin service by default. Follow the steps below to view and invoke it:

  1. Set the <HideAdminServiceWSDLs> element to false in <IS_HOME>/repository/conf/carbon.xml file.

    <HideAdminServiceWSDLs>false</HideAdminServiceWSDLs>
  2. Restart the Identity Server.
  3. If you have started the server in default configurations, use the following URL in your browser to see the WSDL of the admin service: https://localhost:9443/services/RemoteClaimManagerService?wsdl.

Operations included in the API

The following operations are available in the RemoteClaimMangerService.

addNewClaimMapping()
DescriptionAdds a new claim mapping under the specified dialect.
Input Parameters
ParameterDescription
claimURIThe URI defined under the dialect, specific to the claim.
descriptionA description of the functionality of the claim.
dialectURIThe URI of the dialect which the claim belongs to.
displayOrderThe display order of the claim among the other claims defined under the same dialect.
displayTagThe name of the claim as displayed on the user interface.
readOnlyDetermines whether the claim is read only.
regExRegular expression to validate inputs.
requiredDetermines whether this claim is required for user registration.
supportedByDefaultIf unchecked, this claim will not be prompted during user registration.
mappedAttributeThe corresponding attribute name from the underlying user store.
Request
 Click here to see the request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ser="http://service.ws.um.carbon.wso2.org" xmlns:xsd="http://api.user.carbon.wso2.org/xsd">
    <soapenv:Header/>
    <soapenv:Body>
        <ser:addNewClaimMapping>
            <!­­Optional:­­>
            <ser:mapping>
                <!­­Optional:­­>
                <xsd:claim>
                    <!­­Optional:­­>
                    <xsd:checkedAttribute>false</xsd:checkedAttribute>
                    <!­­Optional:­­>
                    <xsd:claimUri>http://wso2.org/claims/tetclaim</xsd:claimUri>
                    <!­­Optional:­­>
                    <xsd:description>TestClaim Description</xsd:description>
                    <!­­Optional:­­>
                    <xsd:dialectURI>http://wso2.org/claims</xsd:dialectURI>
                    <!­­Optional:­­>
                    <xsd:displayOrder>0</xsd:displayOrder>
                    <!­­Optional:­­>
                    <xsd:displayTag>TestClaim</xsd:displayTag>
                    <!­­Optional:­­>
                    <xsd:readOnly>0</xsd:readOnly>
                    <!­­Optional:­­>
                    <xsd:regEx></xsd:regEx>
                    <!­­Optional:­­>
                    <xsd:required>false</xsd:required>
                    <!­­Optional:­­>
                    <xsd:supportedByDefault>false</xsd:supportedByDefault>
                    <!­­Optional:­­>
                    <xsd:value>?</xsd:value>
                </xsd:claim>
                <!­­Optional:­­>
                <xsd:mappedAttribute>null</xsd:mappedAttribute>
            </ser:mapping>
        </ser:addNewClaimMapping>
    </soapenv:Body>
</soapenv:Envelope>
ResponseNone
deleteClaimMapping()
DescriptionDeletes the specified claim mapping under the given dialect URI.
Input Parameters
ParameterDescription
claimURIThe URI defined under the dialect, specific to the claim.
dialectURIThe URI of the dialect that the claim belongs to.
Request
 Click here to see the request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
 xmlns:ser="http://service.ws.um.carbon.wso2.org" xmlns:xsd="http://api.user.carbon.wso2.org/xsd">
    <soapenv:Header/>
    <soapenv:Body>
        <ser:deleteClaimMapping>
            <!­­Optional:­­>
            <ser:mapping>
                <!­­Optional:­­>
                <xsd:claim>
                    <xsd:claimUri>http://wso2.org/claims/tetclaim</xsd:claimUri>
                    <!­­Optional:­­>
                    <xsd:dialectURI>http://wso2.org/claims</xsd:dialectURI>
                    <!­­Optional:­­>
                </xsd:claim>
            </ser:mapping>
        </ser:deleteClaimMapping>
    </soapenv:Body>
</soapenv:Envelope>
ResponseNone
getAllClaimUris()
DescriptionRetrieves a list of all the claim URIs.
Input Parameters

None

Request
 Click here to see the request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ser="http://service.ws.um.carbon.wso2.org">
    <soapenv:Header/>
    <soapenv:Body>
        <ser:getAllClaimUris/>
    </soapenv:Body>
</soapenv:Envelope>
Response
 Click here to see the response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <ns:getAllClaimUrisResponse xmlns:ns="http://service.ws.um.carbon.wso2.org" 
        xmlns:ax2621="http://core.user.carbon.wso2.org/xsd" xmlns:ax2622="http://api.user.carbon.wso2.org/xsd">
            <ns:return>http://wso2.org/claims/otherphone</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:photos.thumbnail</ns:return>
            <ns:return>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/homephone</ns:return>
            <ns:return>preferred_username</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:addresses.country</ns:return>
            <ns:return>http://wso2.org/claims/dob</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:name.honorificSuffix</ns:return>
            <ns:return>http://wso2.org/claims/primaryChallengeQuestion</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:profileUrl</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:active</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:name.formatted</ns:return>
            <ns:return>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname</ns:return>
            <ns:return>phone_number_verified</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:meta.created</ns:return>
            <ns:return>http://axschema.org/contact/country/home</ns:return>
            <ns:return>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dateofbirth</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:roles</ns:return>
            <ns:return>family_name</ns:return>
            <ns:return>phone_number</ns:return>
            <ns:return>birthdate</ns:return>
            <ns:return>http://wso2.org/claims/role</ns:return>
            <ns:return>dob</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:ims.skype</ns:return>
            <ns:return>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/locality</ns:return>
            <ns:return>http://wso2.org/claims/challengeQuestion1</ns:return>
            <ns:return>http://wso2.org/claims/telephone</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:addresses.locality</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:meta.location</ns:return>
            <ns:return>http://wso2.org/claims/mobile</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:addresses.formatted</ns:return>
            <ns:return>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/postalcode</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:photos</ns:return>
            <ns:return>http://wso2.org/claims/country</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:name.familyName</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:userType</ns:return>
            <ns:return>sub</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:name.middleName</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:nickName</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:phoneNumbers.home</ns:return>
            <ns:return>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/country</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:ims</ns:return>
            <ns:return>http://wso2.org/claims/challengeQuestionUris</ns:return>
            <ns:return>gender</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:phoneNumbers.work</ns:return>
            <ns:return>website</ns:return>
            <ns:return>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/stateorprovince</ns:return>
            <ns:return>http://wso2.org/claims/postalcode</ns:return>
            <ns:return>http://wso2.org/claims/challengeQuestion2</ns:return>
            <ns:return>formatted</ns:return>
            <ns:return>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/mobile</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:phoneNumbers.fax</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:addresses.region</ns:return>
            <ns:return>street_address</ns:return>
            <ns:return>http://axschema.org/pref/language</ns:return>
            <ns:return>http://wso2.org/claims/identity/accountLocked</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:phoneNumbers.mobile</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:emails.work</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:addresses.streetAddress</ns:return>
            <ns:return>postal_code</ns:return>
            <ns:return>updated_at</ns:return>
            <ns:return>email_verified</ns:return>
            <ns:return>http://wso2.org/claims/nickname</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:addresses.postalCode</ns:return>
            <ns:return>name</ns:return>
            <ns:return>email</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:emails</ns:return>
            <ns:return>timezone</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:userName</ns:return>
            <ns:return>http://axschema.org/person/gender</ns:return>
            <ns:return>profile</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:externalId</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:timeZone</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:emails.home</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:x509Certificates</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:addresses</ns:return>
            <ns:return>http://axschema.org/namePerson/last</ns:return>
            <ns:return>http://wso2.org/claims/streetaddress</ns:return>
            <ns:return>http://axschema.org/pref/timezone</ns:return>
            <ns:return>http://wso2.org/claims/url</ns:return>
            <ns:return>locale</ns:return>
            <ns:return>http://wso2.org/claims/givenname</ns:return>
            <ns:return>http://axschema.org/birthDate</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:id</ns:return>
            <ns:return>http://wso2.org/claims/emailaddress</ns:return>
            <ns:return>picture</ns:return>
            <ns:return>http://wso2.org/claims/oneTimePassword</ns:return>
            <ns:return>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nickname</ns:return>
            <ns:return>locality</ns:return>
            <ns:return>zoneinfo</ns:return>
            <ns:return>http://wso2.org/claims/region</ns:return>
            <ns:return>http://wso2.org/claims/gender</ns:return>
            <ns:return>http://wso2.org/claims/fullname</ns:return>
            <ns:return>language</ns:return>
            <ns:return>http://wso2.org/claims/passwordTimestamp</ns:return>
            <ns:return>http://axschema.org/contact/postalCode/home</ns:return>
            <ns:return>http://wso2.org/claims/title</ns:return>
            <ns:return>nickname</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:entitlements</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:phoneNumbers.pager</ns:return>
            <ns:return>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname</ns:return>
            <ns:return>postcode</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:phoneNumbers</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:meta.lastModified</ns:return>
            <ns:return>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/otherphone</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:local</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:name.givenName</ns:return>
            <ns:return>urn:scim:schemas:core:1.0:photos.photo</ns:return>
            <ns:return>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier</ns:return>
                <ns:return>urn:scim:schemas:core:1.0:ims.gtalk</ns:return>
                <ns:return>middle_name</ns:return>
                <ns:return>http://axschema.org/namePerson/first</ns:return>
                <ns:return>urn:scim:schemas:core:1.0:displayName</ns:return>
                <ns:return>urn:scim:schemas:core:1.0:emails.other</ns:return>
                <ns:return>urn:scim:schemas:core:1.0:preferredLanguage</ns:return>
                <ns:return>given_name</ns:return>
                <ns:return>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/gender</ns:return>
                <ns:return>urn:scim:schemas:core:1.0:phoneNumbers.other</ns:return>
                <ns:return>region</ns:return>
                <ns:return>http://wso2.org/claims/locality</ns:return>
                <ns:return>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress</ns:return>
                <ns:return>address</ns:return>
                <ns:return>fullname</ns:return>
                <ns:return>urn:scim:schemas:core:1.0:name.honorificPrefix</ns:return>
                <ns:return>http://wso2.org/claims/stateorprovince</ns:return>
                <ns:return>urn:scim:schemas:core:1.0:groups</ns:return>
                <ns:return>urn:scim:schemas:core:1.0:title</ns:return>
                <ns:return>http://wso2.org/claims/im</ns:return>
                <ns:return>http://wso2.org/claims/organization</ns:return>
                <ns:return>http://axschema.org/contact/email</ns:return>
                <ns:return>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/streetaddress</ns:return>
                <ns:return>country</ns:return>
                <ns:return>http://wso2.org/claims/lastname</ns:return>
        </ns:getAllClaimUrisResponse>
    </soapenv:Body>
</soapenv:Envelope>
getAttributeName()
DescriptionReturns a comma-separated list of attributes mapped to the given claim URI
Input Parameters
ParameterDescription
claimURIThe URI defined under the dialect, specific to the claim.
Request
 Click here to see the request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ser="http://service.ws.um.carbon.wso2.org">
    <soapenv:Header/>
    <soapenv:Body>
        <ser:getAttributeName>
            <!­­Optional:­­>
            <ser:claimURI>http://wso2.org/claims/givenname</ser:claimURI>
        </ser:getAttributeName>
    </soapenv:Body>
</soapenv:Envelope>               
Response
 Click here to see the response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <ns:getAttributeNameResponse xmlns:ns="http://service.ws.um.carbon.wso2.org">
            <ns:return>givenName, nickname</ns:return>
        </ns:getAttributeNameResponse>
    </soapenv:Body>
</soapenv:Envelope>
getAttributeNameFromDomain()
DescriptionReturns the name of the attribute based on the specified claim URI of a particular domain.
Input Parameters
ParameterDescription
claimURIThe URI defined under the dialect, specific to the claim.
domainNameThe domain name of the user store.
Request
 Click here to see the request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ser="http://service.ws.um.carbon.wso2.org">
    <soapenv:Header/>
    <soapenv:Body>
        <ser:getAttributeNameFromDomain>
            <!­­Optional:­­>
            <ser:domainName>PRIMARY</ser:domainName>
            <!­­Optional:­­>
            <ser:claimURI>http://wso2.org/claims/givenname</ser:claimURI>
        </ser:getAttributeNameFromDomain>
    </soapenv:Body>
</soapenv:Envelope>
Response
 Click here to see the response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <ns:getAttributeNameFromDomainResponse xmlns:ns="http://service.ws.um.carbon.wso2.org">
            <ns:return>givenName</ns:return>
        </ns:getAttributeNameFromDomainResponse>
    </soapenv:Body>
</soapenv:Envelope>
updateClaimMapping()
DescriptionUpdates an exisiting claim mapping.
Input Parameters
ParameterDescription
claimURIThe URI defined under the dialect, specific to the claim.
descriptionA description of the functionality of the claim.
dialectURIThe URI of the dialect which the claim belongs to.
displayOrderThe display order of the claim among the other claims defined under the same dialect.
displayTagThe name of the claim as displayed on the user interface.
readOnlyDetermines whether the claim is read only.
regExRegular expression to validate inputs.
requiredDetermines whether this claim is required for user registration.
supportedByDefaultIf unchecked, this claim will not be prompted during user registration.
mappedAttributeThe corresponding attribute name from the underlying user store.
Request
 Click here to see the request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ser="http://service.ws.um.carbon.wso2.org" xmlns:xsd="http://api.user.carbon.wso2.org/xsd">
    <soapenv:Header/>
    <soapenv:Body>
        <ser:updateClaimMapping>
            <!­­Optional:­­>
            <ser:mapping>
                <!­­Optional:­­>
                <xsd:claim>
                    <!­­Optional:­­>
                    <xsd:checkedAttribute>false</xsd:checkedAttribute>
                    <!­­Optional:­­>
                    <xsd:claimUri>http://wso2.org/claims/tetclaim1</xsd:claimUri>
                    <!­­Optional:­­>
                    <xsd:description>TestClaim Description new</xsd:description>
                    <!­­Optional:­­>
                    <xsd:dialectURI>http://wso2.org/claims</xsd:dialectURI>
                    <!­­Optional:­­>
                    <xsd:displayOrder>0</xsd:displayOrder>
                    <!­­Optional:­­>
                    <xsd:displayTag>TestClaim1</xsd:displayTag>
                    <!­­Optional:­­>
                    <xsd:readOnly>0</xsd:readOnly>
                    <!­­Optional:­­>
                    <xsd:regEx></xsd:regEx>
                    <!­­Optional:­­>
                    <xsd:required>false</xsd:required>
                    <!­­Optional:­­>
                    <xsd:supportedByDefault>false</xsd:supportedByDefault>
                </xsd:claim>
                <!­­Optional:­­>
                <xsd:mappedAttribute>null</xsd:mappedAttribute>
            </ser:mapping>
        </ser:updateClaimMapping>
    </soapenv:Body>
</soapenv:Envelope>
ResponseNone
  • No labels