BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 09-20-2010, 08:58 PM   #1
big.phil
Knows Where the Search Button Is
 
big.phil's Avatar
 
Join Date: Jan 2008
Location: Seattle
Model: Gnex
PIN: varchar
Carrier: VZW (Galaxy Nexus)
Posts: 33
Thumbs up Sync BES mobile numbers to Active Directory

Please Login to Remove!

I came across a couple threads asking if this is possible and havent seen any good way to sync mobile numbers from BES to Active Directory accounts. So...I created a little app that will sync the users BES mobile number with their Active Directory account "mobile" attribute. I have tested this on BES 5.0 for Microsoft Exchange in a Windows 2008 AD environment and all works great. It should work with older versions of BES but test it in "manual" mode first to verify. Two modes of operation, Manual or Automatic. View the ReadMe.txt file for information on how to configure it!
Attached Files
File Type: zip BEStoADsync.zip (47.7 KB, 20 views)
__________________
--------------------------
BES 5.0.3 MR1, Exchange 2007 SP3 RU5
435 devices
Offline  
Old 09-21-2010, 11:19 AM   #2
big.phil
Knows Where the Search Button Is
 
big.phil's Avatar
 
Join Date: Jan 2008
Location: Seattle
Model: Gnex
PIN: varchar
Carrier: VZW (Galaxy Nexus)
Posts: 33
Default

Also...do not use a trailing "/" in the LdapPath application setting or it will throw the following error: "Error: Unknown error (0x80005000)". I will trap for this in the next build.

If anyone finds a bug or has a feature request, let me know!
__________________
--------------------------
BES 5.0.3 MR1, Exchange 2007 SP3 RU5
435 devices

Last edited by big.phil; 09-21-2010 at 11:20 AM..
Offline  
Old 09-22-2010, 03:17 PM   #3
pumbaa70
Knows Where the Search Button Is
 
Join Date: Jul 2009
Model: 9630
PIN: N/A
Carrier: Verizon Wireless
Posts: 16
Default Error

For some reason I keep on getting this error

9/22/2010 4:15:06 PM - Error: The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception.


Here is my aconfig

<add name="BEStoADsync.My.MySettings.BESConnectionStrin g" connectionString="Data source=BES02\BLACKBERRY;Initial Catalog=BESMgmt;Integrated Security=sspi" />
Offline  
Old 09-22-2010, 03:57 PM   #4
big.phil
Knows Where the Search Button Is
 
big.phil's Avatar
 
Join Date: Jan 2008
Location: Seattle
Model: Gnex
PIN: varchar
Carrier: VZW (Galaxy Nexus)
Posts: 33
Default

I am unable to reproduce this error. Have you tried running the app from a different computer? also...is the .NET Framework up to date and running the .NET Framework client profile 4.0? I have also attached the latest build that corrects the issue from post #2.
Attached Files
File Type: zip BEStoADsync_v1.0.0.1.zip (48.4 KB, 4 views)
__________________
--------------------------
BES 5.0.3 MR1, Exchange 2007 SP3 RU5
435 devices

Last edited by big.phil; 09-22-2010 at 04:37 PM..
Offline  
Old 09-22-2010, 04:35 PM   #5
pumbaa70
Knows Where the Search Button Is
 
Join Date: Jul 2009
Model: 9630
PIN: N/A
Carrier: Verizon Wireless
Posts: 16
Default

I tried unzipping again and got to work not sure what happened. But it doesnt find all the BES Numbers in the database even though they are there it only got some of them any ideas
Offline  
Old 09-22-2010, 04:42 PM   #6
big.phil
Knows Where the Search Button Is
 
big.phil's Avatar
 
Join Date: Jan 2008
Location: Seattle
Model: Gnex
PIN: varchar
Carrier: VZW (Galaxy Nexus)
Posts: 33
Default

i might have an idea, but not quite sure. can you run the following two queries in sql and report back the numbers?
"select count(*) from syncdevicemgmtsummary"
"select count(*) from userconfig"

also...if you find a user that is missing the number in the app, but its showing correctly in the BES database, can you PM me a txt file with all of the data in each of the two tables mentioned above for the user in question? this would help in figuring out what is causing the issue in your environment.
__________________
--------------------------
BES 5.0.3 MR1, Exchange 2007 SP3 RU5
435 devices

Last edited by big.phil; 09-22-2010 at 05:02 PM..
Offline  
Old 09-22-2010, 08:45 PM   #7
pumbaa70
Knows Where the Search Button Is
 
Join Date: Jul 2009
Model: 9630
PIN: N/A
Carrier: Verizon Wireless
Posts: 16
Default

114
114

Can we do private email if I am going to exchange better
Offline  
Old 09-23-2010, 09:45 PM   #8
big.phil
Knows Where the Search Button Is
 
big.phil's Avatar
 
Join Date: Jan 2008
Location: Seattle
Model: Gnex
PIN: varchar
Carrier: VZW (Galaxy Nexus)
Posts: 33
Default

updated version of the app (1.0.0.2). Fixes an issue were mobile numbers might not be populated correctly from the BES database. It is recommended for anybody that is using an older version to run the new version and resync all user accounts.
Attached Files
File Type: zip BEStoADsync_v1.0.0.2.zip (48.4 KB, 6 views)
__________________
--------------------------
BES 5.0.3 MR1, Exchange 2007 SP3 RU5
435 devices

Last edited by big.phil; 09-23-2010 at 09:49 PM..
Offline  
Old 09-28-2010, 12:14 PM   #9
big.phil
Knows Where the Search Button Is
 
big.phil's Avatar
 
Join Date: Jan 2008
Location: Seattle
Model: Gnex
PIN: varchar
Carrier: VZW (Galaxy Nexus)
Posts: 33
Default

updated version (1.0.0.3). Adds the ability to exclude any account from syncing to Active Directory in manual or automatic mode.

If a mod could delete the older attachments in this thread, that would be cool. I cant edit anything old nor delete attachments.
Attached Files
File Type: zip BEStoADsync_v1.0.0.3.zip (49.1 KB, 36 views)
__________________
--------------------------
BES 5.0.3 MR1, Exchange 2007 SP3 RU5
435 devices

Last edited by big.phil; 09-28-2010 at 01:00 PM..
Offline  
Old 11-29-2010, 07:04 PM   #10
TargetIT
CrackBerry Addict
 
Join Date: Jan 2008
Model: 9700
PIN: N/A
Carrier: Rogers
Posts: 709
Default Re: Sync BES mobile numbers to Active Directory

I'm more of a scripting guy and came up with this:

Code:
setlocal ENABLEDELAYEDEXPANSION
sqlcmd -U "username" -P "password" -S "servername\instance" -d besmgmt -Q "set nocount on SELECT RIGHT(dbo.SyncDeviceMgmtSummary.PhoneNumber, 10) AS Expr1, dbo.UserConfig.DisplayName FROM dbo.SyncDeviceMgmtSummary INNER  JOIN dbo.UserConfig ON dbo.SyncDeviceMgmtSummary.UserConfigId = dbo.UserConfig.Id WHERE (RIGHT(dbo.SyncDeviceMgmtSummary.PhoneNumber,10) <> N'')" -o Output.txt -W -h -1
for /f "tokens=1*" %%i in (output.txt) do (
	set PhoneNumber=%%i
	set PhoneNumberFormatted=^(!PhoneNumber:~0,3!^) !PhoneNumber:~3,3!-!PhoneNumber:~6!
	find "%%j" SupressList.txt
	if errorlevel 1 dsquery user -name "%%j" | dsmod user -mobile "!PhoneNumberFormatted!"
)
It's not quite as slick for some obvious reasons, but it works. There's a supresslist.txt file that will prevent some names/numbers from being published (a requirement we had).

Last edited by TargetIT; 11-29-2010 at 07:07 PM..
Offline  
Old 11-29-2010, 08:38 PM   #11
big.phil
Knows Where the Search Button Is
 
big.phil's Avatar
 
Join Date: Jan 2008
Location: Seattle
Model: Gnex
PIN: varchar
Carrier: VZW (Galaxy Nexus)
Posts: 33
Default Re: Sync BES mobile numbers to Active Directory

always good to have more ways of doing the same thing
__________________
--------------------------
BES 5.0.3 MR1, Exchange 2007 SP3 RU5
435 devices
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


ENDOXPERT GASTROENTROLOGY MEMORY BASKET BRAND NEW picture

ENDOXPERT GASTROENTROLOGY MEMORY BASKET BRAND NEW

$118.36



Foot Rest for under Desk - Memory Foam Foot Stool - Back, Lumbar, and Knee Pain picture

Foot Rest for under Desk - Memory Foam Foot Stool - Back, Lumbar, and Knee Pain

$23.11



2 - RAM DRAM Tray-Container Box For Server PC Memory DIMM Modules - Fits 100 NEW picture

2 - RAM DRAM Tray-Container Box For Server PC Memory DIMM Modules - Fits 100 NEW

$21.90



2 Computer Memory Packaging Tray Case for Desktop PC DDR4 Modules - Fits 100 New picture

2 Computer Memory Packaging Tray Case for Desktop PC DDR4 Modules - Fits 100 New

$21.50



We R Makers The Cinch Book Binding Machine Round hole V 2 White Aqua 71050-9 picture

We R Makers The Cinch Book Binding Machine Round hole V 2 White Aqua 71050-9

$79.99



Dental Endo NiTi Gold Taper Heat Activated /Rotary Files Engine Use 21mm/25mm picture

Dental Endo NiTi Gold Taper Heat Activated /Rotary Files Engine Use 21mm/25mm

$296.92







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.