Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Web Services

Reply
New Contributor
curtis
Posts: 5
Registered: ‎04-01-2008
My Device: Not Specified
Accepted Solution

lookup a userId when you know their SMTP

This may be a somewhat elementary question, and if so, then sorry!  But I'm hoping that someone will humor me with an answer, because I've been searching and haven't found the answer yet.

 

I know that once you know a userId, you can lookup all sorts of info about the user, using the getUser command.

 

But, what if I know only a user's SMTP, and I want to pass that in and return their userId, so that I can then do some other operations on their account (set EA password, for example).

 

Is that possible?  I've got to think that it is...  but I'm just not finding anything helpful in the forum or the docs.

 

thanks!!!

 

Retired
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10

Re: lookup a userId when you know their SMTP

Hi Curtis,

 

You can make a call to BAACore.findUsers() and use the SMTP address as your UserSearchCriteria. The result will include the userId. The second Java CXF example in the API docs shows this example:

http://www.blackberry.com/developers/docs/baa/5.0.3/corews/BAACore.html#findUsers(com.rim.bes.bas.dt...

 

Cheers,

Garett
@garettBeuk
--
Goodbye everybody!
New Contributor
curtis
Posts: 5
Registered: ‎04-01-2008
My Device: Not Specified

Re: lookup a userId when you know their SMTP

 


gbeukeboom wrote:

Hi Curtis,

 

You can make a call to BAACore.findUsers() and use the SMTP address as your UserSearchCriteria. The result will include the userId. The second Java CXF example in the API docs shows this example:

http://www.blackberry.com/developers/docs/baa/5.0.3/corews/BAACore.html#findUsers(com.rim.bes.bas.dt...

 

Cheers,


Perfect, exactly what I was looking for.  Thanks!