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
Contributor
AmoZhang
Posts: 19
Registered: ‎09-23-2013
My Device: Developer
My Carrier: Developer
Accepted Solution

BWS - 401

Hello,

 

I am getting 401 error when I run the sample program. How can I troubleshoot this problem. The user is a BES -enabled AD user and I have assigned Enteripse Administrator to this user. Any insights?

 

Thanks,

A.

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

Re: BWS - 401

The likely cause is using the wrong authenticator. Make sure you are using the AD authenticator when creating your EncocedUsername, using the BAS authenticator will not validate properly and return a 401.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Contributor
AmoZhang
Posts: 19
Registered: ‎09-23-2013
My Device: Developer
My Carrier: Developer

Re: BWS - 401

Hello Garett,

 

I have tried the AD authenticator but no luck. Is it the user name Domain\User?

 

Here is the encoded name encodedUsername = "15,0,1,3,1,0;Domain\\BESAdmin11110". Is it normal?

 

Thanks,

A.

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

Re: BWS - 401

That looks correct. Are you sure this is an AD user? When you log in to the BAS portal using this user do you specify the domain? Can you perform the same actions through the BAS with this user account as you are trying to perform via BWS?

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Contributor
AmoZhang
Posts: 19
Registered: ‎09-23-2013
My Device: Developer
My Carrier: Developer

Re: BWS - 401

Oops... I click the Accepted as solution by mistake.

 

I am 100% sure it is an AD user and . I think the error message should be more specified for developer to troubleshoot. 

 

Thanks,

A.

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

Re: BWS - 401

An HTTP 401 is pretty specific...

 

Could you address the other questions asked in my last post?

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Contributor
AmoZhang
Posts: 19
Registered: ‎09-23-2013
My Device: Developer
My Carrier: Developer

Re: BWS - 401

When you log in to the BAS portal using this user do you specify the domain?

- Yes

 

Can you perform the same actions through the BAS with this user account as you are trying to perform via BWS?

- Yes. I get the error when calling getUsers. The account is able to manage users in BAS.

 

Thanks,

A.

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

Re: BWS - 401

Can you successfully call the BWS#echo() command? This will help let us know if the account is properly authenticated, the command should be executable by any user that is properly authenticated regardless of BAS permissions.

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