Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Registering for Store-Wide Events

EWS Managed API

Topic Last Modified: 2006-06-12

Global events can only be registered in the following folders:

For private mailbox stores:

file://./backofficestorage/ADMIN/%userdnsdomain%/MBX/SystemMailbox{GUID}/Storeevents/GlobalEvents

For public folders:

file://./backofficestorage/ADMIN/%userdnsdomain%/Public Folders/Non_ipm_subtree/StoreEvents{GUID}/GlobalEvents

Aa579390.note(en-us,EXCHG.80).gifNote:
Server-wide events are not supported.

To access the global schema of an application or a public store, use The ##SCHEMAURI## Macro.

Global events can be registered only by an Administrator, a member of the Domain Administrators group, or users in the Microsoft® Exchange Administrators role. It is not enough to be a member of the Administrators group or the Exchange Server group. To make a user an Exchange Administrator, use the Exchange Administration Delegation Wizard in the Exchange Management console.

Aa579390.note(en-us,EXCHG.80).gifNote:
Global events must be synchronous. It is not possible register an asynchronous event globally.

The following code demonstrates how to register for a private store-wide event:


dim igetSG
dim regURL
dim WshShell
dim Return

set igetSG=CreateObject("Exoledb.StoreGuidFromUrl.1")
'Get the GUID for the registration process
guid = igetSG.StoreGuidFromUrl("file://./backofficestorage/" + Anystoreitem)
'Anystoreitem is just that. Any store item in the store will get you the
'store url. It might be something like:
'   "theserver.example.com/MBX/user1/inbox"

'Build the registration URL (using "theserver.example.com")
regURL = "file://./backofficestorage/ADMIN/theserver.example.com/MBX/SystemMailbox" & guid & "/StoreEvents/GlobalEvents/my_event"

set WshShell=WScript.CreateObject("WScript.Shell")
Return = WshShell.Run ("cscript c:\regevent.vbs add onsyncsave mysink.sink " & regURL & " -m ANY", 4 , TRUE)

WScript.Echo Return

Show:
© 2015 Microsoft