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
Posts: 2
Registered: ‎06-09-2010
My Device: Curve 8330
My Carrier: Verizon

401 Error When Attempting to Access the BAS Web Services

I'm getting a 401 error when attempting to authenticate to the CoreService.  I'm able to get back the encoded user name from the BAS usin the UtilsService, however the authentication is failing with "bad encoded value looking for lengths" when I try to connect to the CoreService. We've been able to verify the account being used exists in the BAS and can access the BAS web site (it has full admin privalages currently) but for some reason the service call is failing.  The server is at rev 5.0.1 and I'm using the open connection steps outlined in the Blackberry Administration API Developement Guide. 

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

Re: 401 Error When Attempting to Access the BAS Web Services

Hi,

 

Could you post the username and encoded username you're working with? Is this a BAS or Active Directory account you're using (when logging in through the BAS do you need to specify a domain?)?

 

Please also post the snippet of code being used to set up your credentials.

 

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 12
Registered: ‎02-11-2011
My Device: Not Specified

Re: 401 Error When Attempting to Access the BAS Web Services

Hi,

 

I have the exact same problem using bes 5.0.1.  Have you had any luck with this?  I'd really appreciate any guidance you can offer.

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

Re: 401 Error When Attempting to Access the BAS Web Services

Hi,

 

Could you post the username and encoded username you're working with? Is this a BAS or Active Directory account you're using (when logging in through the BAS do you need to specify a domain?)?

 

Please also post the snippet of code being used to set up your credentials.

 

(Sorry to sound like a broken record, the same information is needed to understand why you're receiving the 401)

 

Regards,

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 12
Registered: ‎02-11-2011
My Device: Not Specified

Re: 401 Error When Attempting to Access the BAS Web Services

Hi,

 

The plain username is 'mark', and encoded returns '4,0,0,1,0;mark0'

 

I have tried using an 'active' active directory administrator account and a bas account (the mark one with security administrator privileges).

 

 

 

Contributor
Posts: 12
Registered: ‎02-11-2011
My Device: Not Specified

Re: 401 Error When Attempting to Access the BAS Web Services

Sorry, it's working OK now.  I had to create a BAS user (Authentication type BAS, not active directory) on the Blackberry Enterprise Server administration web interface.

 

It then started working.

New Developer
Posts: 9
Registered: ‎04-06-2011
My Device: Developer
My Carrier: Developer

Re: 401 Error When Attempting to Access the BAS Web Services

Hi

 

I am having problem to access Blackberry Administration services using BES 5.0.3 api with Active directory credentials. It is working FINE with BAS credentials. 

I'm using Microsoft C# and Windows Server 2008.


coreWebService.Credentials = new NetworkCredential(username, password, ServerDomain);

username is encoded: "9,0,0,1,1,0;besadminx00"

password is: Wt90000

and domain is: dev.local

I am able to login with my AD credentials using web console.

What else I have to do to authenticate with my AD credentials.

 

Your help would be appreciated!

Thanks

 

Rizwan Ahmed


New Developer
Posts: 9
Registered: ‎04-06-2011
My Device: Developer
My Carrier: Developer

Re: 401 Error When Attempting to Access the BAS Web Services

Exception message is:
The request failed with HTTP status 401: Unauthorized.