Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Exchange
2000.active.directory
2000.admin
2000.announcements
2000.app.conversion
2000.applications
2000.clients
2000.clustering
2000.connectivity
2000.development
2000.documentation
2000.general
2000.information.store
2000.interop
2000.kms
2000.misc
2000.protocols
2000.realtime.collabo.
2000.setup
2000.transport
2000.win2000
admin
application.conversion
applications
clients
clustering
connectivity
design
development
misc
mobility
setup
tools
  
 
date: Mon, 11 Jul 2005 16:09:03 -0700,    group: microsoft.public.exchange2000.development        back       


Setting msExchMailboxSecurityDescriptor with the DirectoryEntry cl   
Hi

I'm trying to set the descriptor, but no success with:
DirectoryEntry.Properties["msExchMailboxSecurityDescriptor"].Add 
(descriptor.bytes)
DirectoryEntry.Properties["msExchMailboxSecurityDescriptor"].Value = 
descriptor.bytes;
etc..
(Get an error message that the property already exist.)

Anyone successfull in setting this property via the directoryEntry class ?
How to do this with the Active DS type library is described in 
http://support.microsoft.com/default.aspx?scid=kb;en-us;304935 ...

Audun
date: Mon, 11 Jul 2005 16:09:03 -0700   author:   Audun

RE: Setting msExchMailboxSecurityDescriptor with the DirectoryEntry cl   
Have you tried retrieving the security descriptor and setting the parts you 
need. For instance for the Access Control List:

ActiveDs.SecurityDescriptor objSD = 
(ActiveDs.SecurityDescriptor)DirectoryEntry.Properties["msExchMailboxSecurityDesciptor"].Value;
ActiveDs.AccessControlEntry objDACL = objSD.DiscretionaryAcl;

....

objSD.DiscretionaryAcl = newObjDACL;
DirectoryEntry.CommitChanges();

Remember to add the ActiveDs Type Library to your project.


- Bjørn Terje Svennes

"Audun" wrote:

> Hi
> 
> I'm trying to set the descriptor, but no success with:
> DirectoryEntry.Properties["msExchMailboxSecurityDescriptor"].Add 
> (descriptor.bytes)
> DirectoryEntry.Properties["msExchMailboxSecurityDescriptor"].Value = 
> descriptor.bytes;
> etc..
> (Get an error message that the property already exist.)
> 
> Anyone successfull in setting this property via the directoryEntry class ?
> How to do this with the Active DS type library is described in 
> http://support.microsoft.com/default.aspx?scid=kb;en-us;304935 ...
> 
> Audun
> 
> 
>
date: Wed, 13 Jul 2005 06:06:05 -0700   author:   Bjørn Terje Svennes

RE: Setting msExchMailboxSecurityDescriptor with the DirectoryEntr   
Oops. Forgot the:

DirectoryEntry.Properties["msExchMailboxSecurityDesciptor"].Value = objSD;

before calling CommitChanges.


"Bjørn Terje Svennes" wrote:

> Have you tried retrieving the security descriptor and setting the parts you 
> need. For instance for the Access Control List:
> 
> ActiveDs.SecurityDescriptor objSD = 
> (ActiveDs.SecurityDescriptor)DirectoryEntry.Properties["msExchMailboxSecurityDesciptor"].Value;
> ActiveDs.AccessControlEntry objDACL = objSD.DiscretionaryAcl;
> 
> ...
> 
> objSD.DiscretionaryAcl = newObjDACL;
> DirectoryEntry.CommitChanges();
> 
> Remember to add the ActiveDs Type Library to your project.
> 
> 
> - Bjørn Terje Svennes
> 
> "Audun" wrote:
> 
> > Hi
> > 
> > I'm trying to set the descriptor, but no success with:
> > DirectoryEntry.Properties["msExchMailboxSecurityDescriptor"].Add 
> > (descriptor.bytes)
> > DirectoryEntry.Properties["msExchMailboxSecurityDescriptor"].Value = 
> > descriptor.bytes;
> > etc..
> > (Get an error message that the property already exist.)
> > 
> > Anyone successfull in setting this property via the directoryEntry class ?
> > How to do this with the Active DS type library is described in 
> > http://support.microsoft.com/default.aspx?scid=kb;en-us;304935 ...
> > 
> > Audun
> > 
> > 
> >
date: Wed, 13 Jul 2005 06:10:03 -0700   author:   Bjørn Terje Svennes

RE: Setting msExchMailboxSecurityDescriptor with the DirectoryEntr   
This seems to worke fine:

user.DirectoryEntry.Invoke("Put", new Object[] 
{"msExchMailboxSecurityDescriptor", descriptor.GetBytes()});

Uansett tusen takk !

Audun

"Bjørn Terje Svennes" wrote:

> Have you tried retrieving the security descriptor and setting the parts you 
> need. For instance for the Access Control List:
> 
> ActiveDs.SecurityDescriptor objSD = 
> (ActiveDs.SecurityDescriptor)DirectoryEntry.Properties["msExchMailboxSecurityDesciptor"].Value;
> ActiveDs.AccessControlEntry objDACL = objSD.DiscretionaryAcl;
> 
> ...
> 
> objSD.DiscretionaryAcl = newObjDACL;
> DirectoryEntry.CommitChanges();
> 
> Remember to add the ActiveDs Type Library to your project.
> 
> 
> - Bjørn Terje Svennes
> 
> "Audun" wrote:
> 
> > Hi
> > 
> > I'm trying to set the descriptor, but no success with:
> > DirectoryEntry.Properties["msExchMailboxSecurityDescriptor"].Add 
> > (descriptor.bytes)
> > DirectoryEntry.Properties["msExchMailboxSecurityDescriptor"].Value = 
> > descriptor.bytes;
> > etc..
> > (Get an error message that the property already exist.)
> > 
> > Anyone successfull in setting this property via the directoryEntry class ?
> > How to do this with the Active DS type library is described in 
> > http://support.microsoft.com/default.aspx?scid=kb;en-us;304935 ...
> > 
> > Audun
> > 
> > 
> >
date: Wed, 13 Jul 2005 06:16:15 -0700   author:   Audun

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us