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 Developer
itsrizi
Posts: 9
Registered: ‎04-06-2011
My Device: Developer
Accepted Solution

Blackberry administration services authentication error with AD Credentials "HTTP status 401: Unauthorized."

Hi

 

I am having problem to access Blackberry Administration services using BES 5.0.3 api with Active directory credentials. The request failed with HTTP status 401: Unauthorized.

However, It is working FINE with BAS credentials. 

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

 

code snippet
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

www.hostingcontroller.com

 

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

Re: Blackberry administration services authentication error with AD Credentials "HTTP status 401: Unauthorized."

Finally the problem is solved :smileyhappy:

 

Here is what I had to do:

 

ExternalAuthenticatorTypesEnum authenticator = new ExternalAuthenticatorTypesEnum();     authenticator.@enum = ExternalAuthenticatorTypesEnumType.AUTHENTICATOR_TYPE_PLUG_IN;     authenticator.enumSpecified = true;

encodeUsernameRequest.domain = DomainName; //dev.local

encodeUsernameRequest.type = authenticator;  

encodeUsernameRequest.credentialType = "0";

encodeUsernameRequest.identifier = nID; // 111  

 

Also you can find available external authenticators  by:

 

findAuthenticators findAthen = new findAuthenticators();  

findAthen.locale = "en_US";

Authenticator[] auth = utilWebService.findAuthenticators(findAthen);

 

and you only have to pass the Encodedusername stinrg and password to

NetworkCredentials class, not Domain name e.g. 

coreWebService.Credentials = new NetworkCredential(Encodedusername , password);

 

Rizwan Ahmed

www.hostingcontroller.com