CorvettePower.COM
1Feb/05

Programatically assigning Delegates in Outlook / Exchange

Currently I am working on a project to move people from another calendaring package (Meeting maker) to Exchange Calendaring. The one thing that we can't seem to automate across is users Proxies. Creating this programatically hasn't been straight forward. I found several links about how to use a ACL.DLL file to provide extra functions that allow you to modify permissions on any folder. This works out great, but the results are not visable via Outlooks "Delegates" tab under Tools->Options->Delegates. So if we setup peoples delegates for them, they will be essentially hidden. Unless we teach people to just goto the Sharing option on the Calendar... you get to this by right clicking the calendar object, and selecting Sharing (in Outlook 2003).


See update below on how to make these changes visable to Outlook.


Here are several links I have found, I had to modify these VBScripts to get the right bit flags for Reviewer, Editor, and None (which is 0) 🙂 A complete ACL.inc file is in the download from the 2nd link (aclasp.zip).


http://www.kbalertz.com/kb_Q295558.aspx

http://www.cdolive.com/sampapps.htm

http://blogs.officezealot.com/legault/archive/2004/03/16/216.aspx

http://www.cdolive.com/aclviewer.htm - ACL Viewer - Lets you see these changes.

http://www.codecomments.com/Windows_Server_Scripting/message192844.html


A google on "MSExchangeACLLib Exchange 2003" helped alot to narrow down my search.


UPDATE 2/4/2005:
The following code makes a users be listed in the Delegates Tab in Outlook. It only allows for 1 delegate, but you get the idea and can modify it to use an Add, and query to ensure your not adding dupes:



' VBScript source code
On Error Resume Next

Dim strUser
Dim strOU
Dim strDC

Dim objParent ' GetObject of strOU

strDC = "DC=company,DC=com"
strOU = "OU=Users,OU=San Diego,"
' Person who's calendar/inbox is to be viewed by Delegate
strUser = "myUsername"

' Person to grant delegate access to, this just makes them visable.
strDelegate = "CN=username,OU=Users,OU=San Diego,DC=company,DC=com"

set objParent = GetObject ("LDAP://CN=" & strUser & "," & strOU & strDC)

objParent.Put "publicDelegates",strDelegate
objParent.SetInfo

Trackbacks are disabled.