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. New to the forum? Please visit the ‘Getting Started’ link below.
Reply
New Developer
makerofthings7
Posts: 7
Registered: ‎01-27-2011

How do I send an Enterprise Activation email? Using EnableBlackBerryUserDispatcherAttributes?

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!

Please use plain text.
Developer
simon_hain
Posts: 13,775
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: How do I send an Enterprise Activation email? Using EnableBlackBerryUserDispatcherAttributes?

there is no API for this, the user has to do it.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
New Developer
makerofthings7
Posts: 7
Registered: ‎01-27-2011

Re: How do I send an Enterprise Activation email? Using EnableBlackBerryUserDispatcherAttributes?

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;

Please use plain text.
BlackBerry Development Advisor
gbeukeboom
Posts: 1,841
Registered: ‎10-16-2009
My Carrier: Bell

Re: How do I send an Enterprise Activation email? Using EnableBlackBerryUserDispatcherAttributes?

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.

Garett Beukeboom
BlackBerry Development Advisor
Developer Zone
@garettbeukeboom

--
Think of a great new feature? Find a bug?
Log and track them using the Developer Issue Tracker
Please use plain text.
New Member
robtras
Posts: 1
Registered: ‎03-11-2011
My Carrier: verizon

Re: How do I send an Enterprise Activation email? Using EnableBlackBerryUserDispatcherAttributes?

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(setPassword);
                    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(clearPassword);
                ClearActivationPasswordResult clearResult = clearResponse.returnValue;
                if (clearResult.clearActivationPasswordReturnStatus.code != ClearActivationPasswordReturnStatusEnumType.SUCCESS)
                {
                    return false;
                }
                return true;
            }
            catch (System.Exception e)
            {
                return false;
            }
        }

Please use plain text.
New Contributor
umrawabaorg
Posts: 2
Registered: ‎09-04-2011
My Carrier: T.Mobile

Re: How do I send an Enterprise Activation email? Using EnableBlackBerryUserDispatcherAttributes?

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

8642
Please use plain text.