xdmp:user-privileges( $user as xs:string, [$extSecId as xs:unsignedLong], [$secDbFirst as xs:boolean] ) as xs:unsignedLong*
Return IDs of all privileges that a user have.
http://marklogic.com/xdmp/privileges/xdmp-user-privileges
xdmp:user-privileges("ian") => (239871567325, 432987324)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.