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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

New Developer
Posts: 15
Registered: ‎08-14-2013
My Device: Bold 9000
My Carrier: T-Mobile
Accepted Solution

How to delete a user using the BWS



I'm working on a little app that can delete multiple user from the BAS. I'm using the BWS for this, but something is not clear.

My function is this:


        public static bool DeleteUser(string[] inputEmail)
            DeleteUsersRequest UserDeleteRequest = new DeleteUsersRequest();
            UserDeleteRequest.metadata = BasicSettingData.Metadata;

            User egy = new User();
            User[] DeletableUserArray = new User[1]{egy};
            DeletableUserArray[0].emailAddresses = inputEmail;
            UserDeleteRequest.users = DeletableUserArray;

            DeleteUsersResponse UserDeleteResponse = new DeleteUsersResponse();

                UserDeleteResponse = BasicSettingData.bwsService.deleteUsers(UserDeleteRequest);
            catch (Exception e)
                MessageBox.Show( e.Message + "     " + e.StackTrace);
                return false;
            if (UserDeleteResponse.returnStatus.code.Equals("SUCCESS"))

            return true;

 The function throw no error or exception, however the users are not deleted. I'm defenetly missed something, just don't know what. Smiley Happy

Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: How to delete a user using the BWS

In your function you create the User object, then use that same User object to attempt deletion. You instead need to grab the User(s) you want to delete from a getUsers() call.

Goodbye everybody!
New Developer
Posts: 15
Registered: ‎08-14-2013
My Device: Bold 9000
My Carrier: T-Mobile

Re: How to delete a user using the BWS

[ Edited ]

You're absolutly correct. 

Meanwhile I've just set up a local test enviroment, and the response's returnstatus informed me, that it can not delete a user by an e-mail address.

So I created a class that find the user and return its UID and with that the delete request run perfectly.

Thx for the help.