01-27-2011 11:39 PM
I need to enable and send an Enterprise Activation email, however I need to also set an ActivationPassword.
I looked at the help document and after tracing the abstract classes, I think I need to do "something" with EnableBlackBerryUserDispatcherAttributes.
How do I send an enterprise activation email with a password to an Exchange user? I can't find anything, anywhere. (Sure I can add a user to the server, but what good is that if I can't activate the account !?)
Thanks!
01-28-2011 04:44 AM
there is no API for this, the user has to do it.
01-28-2011 11:13 AM
Who is the "User" in this context: The BES Administrator, or the enduser who owns the device.
If you mean the End User who owns the device, how is this done? I'm only aware of the BES Administrator having this ability in the GUI.
The following classes are present in the WebService, which make me think that it may be possible to generate the activation email though my application
//ActivationPassword;
//ActivationContext;
//ActivationPasswordType;//ActivationPasswordOperationTypeEnumType;
//clearActivationPassword;
//EnterpriseActivationEvent;
//setActivationPassword;
02-01-2011 01:51 PM
You could use the call to generateActivationPassword() included in the BAADispatcher interface. It will generate the Enterprise Activation password for the user then email them the password.
03-11-2011 01:10 PM
Try this,it works for me.
private bool SendEmailToUser(int currentUserID, String password)
{
try
{
UserMessage message = new UserMessage();
message.subject = "BlackBerry Activation";
message.body = "Your account has been provisioned on the Blackberry Enterprise Server. Please use Advanced Options on your Blackberry device to enable Enterprise Activation. Enter your primary email address and the following password: " + password;
EmailCommonMessageTypeEnum messageType = new EmailCommonMessageTypeEnum();
messageType.@enum = EmailCommonMessageTypeEnumType.EMAIL;
messageType.enumSpecified = true;
sendMessageToUser userMessage = new sendMessageToUser();
userMessage.userId = currentUserID;
userMessage.message = message;
userMessage.messageTypeEnum = messageType;
sendMessageToUserResponse response = coreWebService.sendMessageToUser(userMessage);
SendMessageToUserResult result = response.returnValue;
if (result.sendMessageToUserReturnStatus.code != SendMessageToUserReturnStatusEnumType.SUCCESS)
{
return false;
}
return true;
}
catch (System.Exception e)
{
return false;
}
}
private bool SetEAPassword(int currentUserID, String eaPassword)
{
try
{
if (ClearEAPassword(currentUserID))
{
setActivationPassword setPassword = new setActivationPassword();
setPassword.expiryHours = 48;
setPassword.password = eaPassword;
setPassword.userId = currentUserID;
setActivationPasswordResponse response = dispatchWebService.setActivationPassword(setPasswo
SetActivationPasswordResult result = response.returnValue;
if (result.setActivationPasswordReturnStatus.code != SetActivationPasswordReturnStatusEnumType.SUCCESS)
{
return false;
}
return true;
}
else
{
return false;
}
}
catch (System.Exception e)
{
return false;
}
}
private bool ClearEAPassword(int currentUserID)
{
try
{
clearActivationPassword clearPassword = new clearActivationPassword();
clearPassword.userId = currentUserID;
clearActivationPasswordResponse clearResponse = dispatchWebService.clearActivationPassword(clearPa
ClearActivationPasswordResult clearResult = clearResponse.returnValue;
if (clearResult.clearActivationPasswordReturnStatus.c
{
return false;
}
return true;
}
catch (System.Exception e)
{
return false;
}
}
09-07-2011 09:07 PM
I tried it more than 2000 times to activate it but everytime it disappointed me and I really I hate the name of the blackberry so I even hate to try again I need automatic activation not guidelines can you hep me please.
ThankS
OSAMA KHAIR