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
Posts: 7
Registered: ‎01-27-2011
My Device: Not Specified

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!

Developer
Posts: 17,011
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
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
New Developer
Posts: 7
Registered: ‎01-27-2011
My Device: Not Specified

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;

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
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
@garettBeuk
--
Goodbye everybody!
New Member
Posts: 1
Registered: ‎03-11-2011
My Device: curve
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;
            }
        }

New Contributor
Posts: 2
Registered: ‎09-04-2011
My Device: 8320
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