10-20-2011 01:49 AM
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.
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!
Solved! Go to Solution.
10-20-2011 03:27 AM
Finally the problem is solved
Here is what I had to do:
ExternalAuthenticatorTypesEnum authenticator = new ExternalAuthenticatorTypesEnum(); authenticator.@enum = ExternalAuthenticatorTypesEnumType.AUTHENTICATOR_T
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);