What is the difference between getUser() in CrowdSerivce and UserManager

Hi,

I’m using Jira server 7.12.1 version with crowd sso configured.

I’m developing a jira plugin to handle user information so first, I did use “UserManager.getUser(string id)” to get User information but it returns null for some users whereas “CrowdService.getUser()” works.

So I have checked the users to figure out the differences but so far, I can’t find anything because all users are located in the crowd directory with sso and almost all user information is returend by UserManager api and that makes me confused and what should I use to get user information.

Please anyone let me know what is the exact different for those apis and any clue that some user information is only returned CrowdService api.

Thanks.