I'm writing an exchange event sink application which monitors for mailbox events and one of items I'm looking to do is to identify if mailbox access is done by primary owner or another person. Basically, what I'm trying to do is to obtain information during event execution which will allow me to locate the SID of mailbox owner. I'm a little bit confused what can be done to make this happen. I was trying following approaches: - use the mailbox alias part of "file://./backofficestorage/domain/MBX/alias/..." URL. Didn't work, because this alias is being fixed after mailbox is created and will not change if AD user changes his alias, hence it's not possible to rely on this data - use ntsecuritydescriptor to determine owner. Didn't work, because owner is always shown as DOMAIN\Administrators group. - Determine mailbox GUID and locate user in AD which is tied to this GUID. Didn't work because I couldn't find any way to locate mailbox GUID using EXOLEDB. I also tried to use MAPI properties to locate this GUID and couldn't find a property which would give me that. Any suggestions?
Update: I also tried to use IExchangeManageStore->GetMailboxTable() method as a way to link mailbox alias to a legacyExchangeDN (/O=organization/OU=AdmGroup/CN=Configuration.../CN=mailbox). Didn't work: I could obtain legacyExchangeDn in PR_EMAIL_ADDRESS field, but there's no information which will alow me to link this to EXOLEDB URL. "Sergey Galtsev" wrote: > I'm writing an exchange event sink application which monitors for mailbox > events and one of items I'm looking to do is to identify if mailbox access is > done by primary owner or another person. Basically, what I'm trying to do is > to obtain information during event execution which will allow me to locate > the SID of mailbox owner. I'm a little bit confused what can be done to make > this happen. I was trying following approaches: > > - use the mailbox alias part of > "file://./backofficestorage/domain/MBX/alias/..." URL. Didn't work, because > this alias is being fixed after mailbox is created and will not change if AD > user changes his alias, hence it's not possible to rely on this data > > - use ntsecuritydescriptor to determine owner. Didn't work, because owner is > always shown as DOMAIN\Administrators group. > > - Determine mailbox GUID and locate user in AD which is tied to this GUID. > Didn't work because I couldn't find any way to locate mailbox GUID using > EXOLEDB. I also tried to use MAPI properties to locate this GUID and couldn't > find a property which would give me that. > > Any suggestions?
Hello, if you have the legacyExchangeDN, you can use this to perform a search in the Active Directory. This will return the user with the specified legacyExchangeDN. Kind regards, Henning "Sergey Galtsev" wrote in message news:3B15B7C1-09D3-4D27-860F-69E253F521A8@microsoft.com... > Update: I also tried to use IExchangeManageStore->GetMailboxTable() method > as > a way to link mailbox alias to a legacyExchangeDN > (/O=organization/OU=AdmGroup/CN=Configuration.../CN=mailbox). Didn't work: > I > could obtain legacyExchangeDn in PR_EMAIL_ADDRESS field, but there's no > information which will alow me to link this to EXOLEDB URL. > > > "Sergey Galtsev" wrote: > >> I'm writing an exchange event sink application which monitors for mailbox >> events and one of items I'm looking to do is to identify if mailbox >> access is >> done by primary owner or another person. Basically, what I'm trying to do >> is >> to obtain information during event execution which will allow me to >> locate >> the SID of mailbox owner. I'm a little bit confused what can be done to >> make >> this happen. I was trying following approaches: >> >> - use the mailbox alias part of >> "file://./backofficestorage/domain/MBX/alias/..." URL. Didn't work, >> because >> this alias is being fixed after mailbox is created and will not change if >> AD >> user changes his alias, hence it's not possible to rely on this data >> >> - use ntsecuritydescriptor to determine owner. Didn't work, because owner >> is >> always shown as DOMAIN\Administrators group. >> >> - Determine mailbox GUID and locate user in AD which is tied to this >> GUID. >> Didn't work because I couldn't find any way to locate mailbox GUID using >> EXOLEDB. I also tried to use MAPI properties to locate this GUID and >> couldn't >> find a property which would give me that. >> >> Any suggestions?