Counting users and roles using Management Console and Admin Services
This feature will be deprecated in a future version as it could cause long-running connection leaks.
- Download the product from the WSO2 product page.
Add the below property inside
<UserStoreManager class="org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager">
configuration in <IS_HOME>/repository/conf/user-mgt.xml.<Property name="CountRetrieverClass">org.wso2.carbon.identity.user.store.count.jdbc.JDBCUserStoreCountRetriever</Property>
Start the server.
Using the Management Console
You can access the user store count using the management console. Follow the steps below to do this:
- Log in to the Management Console and navigate to users and roles.
- Under Users, you see a new table named "Count Users" where you can count (by clicking Count Users button) the number of users in each domain for different claims and user name patterns etc. (In this example '%admin' is given as search pattern)
- Similarly, under Roles, you see a table named Count Roles where you can count roles in different user store domains.
Using the Admin Services
If you are using the Admin Services to count the users and roles, follow the below steps:
Change the
HideAdminServiceWSDLs
property in<IS_HOME>/repository/conf/carbon.xml
to false to get access to the WSDL's of the admin services.<HideAdminServiceWSDLs>false</HideAdminServiceWSDLs>
Access the WSDL of UserStoreCountService service by browsing https://localhost:9443/services/UserStoreCountService?wsdl. If the WSDL is loading, access the methods of the service through SoapUI. Here, you will have access to additional methods (CountByClaimsInDomain, countClaims) than from the Management Console.
By default, only JDBC user store implementations support this service but the functionality can be extended to LDAP user stores or any other type of user store as well.