Loading TOC...


   role-name as String,
   external-name as String[]
) as null


This function sets a role to be matched to one or more external LDAP distinguished names.

role-name The role to be set for the external user.
external-name A sequence of one or more external LDAP distinguished names to be associated with the named role.


(: execute this against the security database :)
xquery version "1.0-ml"; 
import module namespace sec = "http://marklogic.com/xdmp/security" 
      at "/MarkLogic/security.xqy";
sec:role-set-external-name("admin", ("UID=joe,CN=Users,DC=MARKLOGIC1,DC=COM"))

(: Sets the external LDAP distinguished name for the "admin" role to 
   "UID=joe,CN=Users,DC=MARKLOGIC1,DC=COM". :)

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.