SetAA – Tweak Auto Accept Settings Across Mailboxes

This is a tool/sample I’ve had sitting on my drive ever since the DST changes back in 2007. Until recently, this tool used internal MAPI properties and algorithms, which meant I couldn’t share the source. The Exchange Protocol docs have changed that, so I thought I’d clean the tool up and publish it so everyone can benefit.

The problem to solve here is how to deploy Auto Accept settings across a large number of mailboxes. These settings are typically used to configure the Outlook direct booking feature for resource mailboxes. It’s easy to set these for one mailbox. Tools/Options/Calendar Options/Resource Scheduling will bring up this dialog:

Resource Scheduling dialog in Outlook for setting Auto Accept

From there, just check the settings you want and Auto Accept is configured. Suppose you want to do it for a bunch of mailboxes? We don’t have a way of deploying these settings. That’s where SetAA comes in. The SetAA sample shows how to modify the properties that store the settings:

PR_SCHDINFO_AUTO_ACCEPT_APPTS – "Automatically accept meeting requests and process cancellations"
PR_SCHDINFO_DISALLOW_OVERLAPPING_APPTS – "Automatically decline conflicting meeting requests"
PR_SCHDINFO_DISALLOW_RECURRING_APPTS – "Automatically decline recurring meeting requests"

In addition to dealing with these properties, SetAA gave me a chance to try implementing the “Finding the Free/Busy Message” algorithm from [MS-OXOPFFB]. I talked about this algorithm here, but this is the first time I’ve tried implementing it.

I decided to post both the sample code and a compiled copy of setAA in case anyone wants to try it out but doesn’t want to deal with building it:

As usual, all caveats and disclaimers for samples apply. You can run SetAA from the command line (use –? to get help) to control the settings for a single maibox, or even every mailbox on a server. If you want to run SetAA against a targeted group of mailboxes, you could run it in a for loop. For instance, suppose you want to disable all three Auto Accept settings on a set of mailboxes. You’d put a list of legacy DNs for the mailboxes in a file (here called legdns.txt), and run it like this:

for /F "delims=" %i in (legdns.txt) do @SetAA -p "Outlook" -m "%i" -Z

Where “Outlook” is the name of the profile and –Z is the switch to completely disable Auto Accept settings for the mailboxes listed in the text file. Note also that if you put this command in a batch file, you’d need to use %%i instead of %i.

Comments (4)

  1. Christian Schindler says:

    Hi Stephen, isn’t that what

    Set-CalendarProcessing in Exchange 2010 does?


  2. Stephen Griffin says:

    Maybe – but that only works if you’ve already migrated to 2010.

  3. Guy Steves says:

    I am trying to get this to work and get as far as this:

    for /F "delims=" %i in (legdns-lab.txt) do @SetAA -P "ustestroom2" -M "%i" -Z -V

    INFO: OpenOtherUsersMailbox called with lpMAPISession = 0x011A2418, lpMDB = 0x003DFFBC, Server = "Server1", Mailbox = "CN=.US-Test Roo


    INFO: Calling HrMailboxLogon with Server DN = "/cn=Configuration/cn=Servers/cn=server1/cn=Microsoft Private MDB"

    INFO: HrMailboxLogon: Creating EntryID. StoreDN = "/cn=Configuration/cn=Servers/cn=server1/cn=Microsoft Private MDB", MailboxDN = "CN=.US-Test Roo


    ERROR: , Code: 0x8004011D, Function lpMAPISession->OpenMsgStore( NULL, sbEID.cb, (LPENTRYID) sbEID.lpb, NULL, MDB_NO_DIALOG | MDB_NO_MAIL |

    MDB_TEMPORARY | MAPI_BEST_ACCESS, &lpMailboxMDB), File .MAPIStoreFunctions.cpp, Line 335

    ERROR: , Code: 0x8004011D, Function HrMailboxLogon( lpMAPISession, lpMDB, szServerDN, szMailboxDN, bUseAdminPriv, lppOtherUserMDB), File .M

    APIStoreFunctions.cpp, Line 378

    Any ideas why this would fail?

  4. What permissions is required? i am trying to run setaa -S servername -Z. But nothing is happening, i am prompted for profile name. But i recieve no error message.