Create type (objectClass) using stored procedures

exec ld.sp_AddEntry --create new entry
'IS_UHUL' --RootDSE name
,N'cn=securityTokenObject,cn=schema,cn=config' --DN of created entry
,'top' --parent type
,'securityTokenObject' --RDN
,'cn=schema,cn=config' --Superior path
, 0 --is instance/is type, 0=type, 1=instance
, null --return val, DnKey GUID of created entry


exec ld.sp_AddRelation --create attribute for new entry
'IS_UHUL'
,N'cn=securityTokenObject,cn=schema,cn=config' --DN of entry to create attrib for
,'mod' --attribute name (mod is reserved attr that defines type modifier as ABSTRACT, STRUCTURAL, AUXILIARITY)
,'STRUCTURAL' --attr value
,null --return value, indicates IsDirty state of entry after this operation


exec ld.sp_AddRelation --another attr
'IS_UHUL'
,N'cn=securityTokenObject,cn=schema,cn=config'
,'MUST' --MUST is another reserved attr defines list of mandatory attrs
,'owner' --name of attribute, this entry must already exist in directory !!
,null

 
exec ld.sp_AddRelation --one more attr
'IS_UHUL'
,N'cn=securityTokenObject,cn=schema,cn=config'
,'MAY' --another reserved attr, defines optional attribute
,'isMemberOf' --named, again isMemberOf is RDN of existing entry
, null

Last edited Aug 17, 2013 at 9:03 AM by asida, version 6

Comments

No comments yet.