How to check if the user exists in RTC ?
Hello All,
We have a usecase wherein we need to automate the user account creation.
As a part of first step. Given the userID, we need to check if the user has account in RTC.
Is there any OSLC/REST query to check this ? Or any other APIs to check the user existence ?
Request you to assist on this.
Thanks
2 answers
Options for automation
- Repotools -exportUsers
- Repotools -importUsers
- Repotools -createUsers
- Java API https://rsjazz.wordpress.com/2013/01/08/maintaing-user-photos-with-the-plain-java-client-libraries/ and https://rsjazz.wordpress.com/2012/10/12/changing-the-jazz-user-id-using-the-rtc-plain-java-client-libraries/ show at least how to get the users and find them using an ID.
Shwetha,
I use this code snippet from the server-side Java API to retrieve a user (contributor) with a given userid:
IContributorService contributorService = getService(IContributorService.class);
IContributorHandle contributorHandle = contributorService.fetchContributorByUserId(userid);
IContributor contributor = (IContributor) repositoryItemService.fetchItem(contributorHandle, IRepositoryItemService.COMPLETE);
In order to check whether a user exists in RTC, you could check if contributorHandle is null.