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.

Reply
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Create a blackberry enabled user with Web services for Enterprise Administration

Hey Sean,

 

Great! Sounds like some progress. This new error seems to point to the fact that the user is not visible in AD from the BAS. Can you verify that you can find the user in a search from the BAS and that all information (email address, display name etc) matches?

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Contributor
scmurdock
Posts: 15
Registered: ‎01-14-2012
My Device: Developer
My Carrier: Developer

Re: Create a blackberry enabled user with Web services for Enterprise Administration

Hi Garett- we had a configuration problem not related to BWS. The code works now. Thanks!!

 

Sean

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Create a blackberry enabled user with Web services for Enterprise Administration

Great to hear Sean! Thanks for keeping us posted.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Contributor
scmurdock
Posts: 15
Registered: ‎01-14-2012
My Device: Developer
My Carrier: Developer

Re: Create a blackberry enabled user with Web services for Enterprise Administration

Hi Garett- I just wanted to let you know, in case it matters, that when the following code was used, I continued to get the internal error message. When I commented it out, the user was created..

 

		   //use this mail account
		   AccountAttributes accountAttributes=new AccountAttributes();
		   accountAttributes.setEmailAddress("jtanner@test.com");
		   newUser.setAccountAttributes(accountAttributes);

 

Please use plain text.
Contributor
hpagey
Posts: 10
Registered: ‎01-24-2012
My Device: Blackberry Bold
My Carrier: Sprint PCS

Re: Create a blackberry enabled user with Web services for Enterprise Administration

We are facing the same issue. When we try to provide email address the BWS says it cannot create user. The exact return status code and message are as follows,

 

code="USER_CREATION_FAILED"

message="Failed to create user"

 

 

GetRolesRequest requestRole = new GetRolesRequest();
requestRole.metadata = Metadata;

//get all roles
requestRole.name="";

GetRolesResponse responseRole = BES.bwsService.getRoles(requestRole);


CreateUsersRequest cUR = new CreateUsersRequest();
cUR.metadata = BES.Metadata;

NewUser nU = new NewUser();
UserAttributes uAttribs = new UserAttributes();

//active directory authentication
uAttribs.authenticator= BES.GetAuthenticator(BES.AuthenticatorName);
uAttribs.loginName ="researchtest2";
uAttribs.loginPassword ="Password1";
uAttribs.domain ="dev";
uAttribs.displayName ="Research Test2";
uAttribs.roleUid = responseRole.roles[0].uid;

AccountAttributes aAttribs = new AccountAttributes();
aAttribs.emailAddress = "ResearchTest2@dev.com";
GetServersRequest serverRequest = new GetServersRequest();
serverRequest.metadata = BES.Metadata;
serverRequest.hostName = "";
GetServersResponse serversResponse = bwsService.getServers(serverRequest);

nU.server = serversResponse.servers[0];
nU.accountAttributes = aAttribs;
nU.userAttributes = uAttribs;

// Server sr = new Server();
// sr.
cUR.newUsers = new NewUser[1];
cUR.newUsers[0] = nU;
CreateUsersResponse cUResponse = BES.bwsService.createUsers(cUR);

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Create a blackberry enabled user with Web services for Enterprise Administration

Can you create this same user through the BAS console? Does the user need a BlackBerry smartphone account as well as login access to the BAS?

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Contributor
hpagey
Posts: 10
Registered: ‎01-24-2012
My Device: Blackberry Bold
My Carrier: Sprint PCS

Re: Create a blackberry enabled user with Web services for Enterprise Administration

Hi Garett, 

 

Thanks for such a quick response.  We are able to create the same user through BAS console. 

 

Following is our use case, 

 

a) We create a AD user account in BES.

b) We set a activation password for that user. 

c) User activates his/her blackberry device.

d) We sycn with BES to bring in the activated device under that specific AD account . 

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Create a blackberry enabled user with Web services for Enterprise Administration

Does the user need a BlackBerry smartphone account as well as login access to the BAS?

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Contributor
hpagey
Posts: 10
Registered: ‎01-24-2012
My Device: Blackberry Bold
My Carrier: Sprint PCS

Re: Create a blackberry enabled user with Web services for Enterprise Administration

No, they dont. 

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Create a blackberry enabled user with Web services for Enterprise Administration

If they just require a smartphone account and not BAS access then try commenting out the UserAttributes object, this is only required for BAS accounts.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.