OpenDirectory Functions

This document describes the functions, constants, and data types used to interact with Open Directory.

Topics

Working with the Open Directory Context

ODContextGetTypeID

Returns the type ID for the Open Directory context.

Working with Nodes

ODNodeCopyDetails

Returns a dictionary containing details about a node.

ODNodeCopyRecord

Returns a reference to a record of a node.

ODNodeCopySubnodeNames

Returns the names of subnodes for a given node.

ODNodeCopySupportedAttributes

Returns an array of attribute types supported by a given node.

ODNodeCopySupportedRecordTypes

Returns an array of the record types supported by a given node.

ODNodeCopyUnreachableSubnodeNames

Returns an array of the subnodes of a given node that are currently unreachable.

ODNodeCreateCopy

Returns a copy of an existing node.

ODNodeCreateRecord

Creates a record in a specified node with specified properties.

ODNodeCreateWithName

Returns a new node created with a specified name.

ODNodeCreateWithNodeType

Returns a new node created with a specified type.

ODNodeCustomCall

Returns the result of a custom call to a node.

ODNodeGetName

Returns the name of a node.

ODNodeGetTypeID

Returns the type ID for an Open Directory node.

ODNodeSetCredentials

Sets credentials for interacting with a node.

ODNodeSetCredentialsExtended

Sets credentials for interacting with a node using a specified authentication method.

ODNodeSetCredentialsUsingKerberosCache

Sets credentials for interacting with a node with the Kerberos cache.

Deprecated

Working with Queries

ODQueryCopyResults

Returns results from a query synchronously.

ODQueryCreateWithNode

Creates a query with a node using provided parameters.

ODQueryCreateWithNodeType

Creates a query for a particular node type using provided parameters.

ODQueryGetTypeID

Returns the type ID for an Open Directory query.

ODQueryScheduleWithRunLoop

Retrieves results from a query asynchronously by scheduling the query in a run loop.

ODQuerySetCallback

Sets the callback for an asynchronous query.

ODQuerySetDispatchQueue

Retrieves results from a query asynchronously by adding the query to a dispatch queue.

ODQuerySynchronize

Restarts a query, disposing of any results it has obtained.

ODQueryUnscheduleFromRunLoop

Removes a query from a specified run loop.

Working with Records

ODRecordAddMember

Adds a record as a member of a group record.

ODRecordAddValue

Adds a value to an attribute of a record.

ODRecordChangePassword

Changes the password of a record.

ODRecordContainsMember

Returns whether a group record contains a given record.

ODRecordCopyDetails

Returns the values of a record’s attributes.

ODRecordCopyPasswordPolicy

Returns the password policies of a record.

Deprecated
ODRecordCopyValues

Returns the value of a single attribute of a record.

ODRecordDelete

Deletes a record from a node and invalidates the record.

ODRecordGetRecordName

Returns the official name of a record.

ODRecordGetRecordType

Returns the type of a record.

ODRecordGetTypeID

Returns the type ID for a record.

ODRecordRemoveMember

Removes a record as a member from a specified group record.

ODRecordRemoveValue

Removes a value from a record’s attribute.

ODRecordSetNodeCredentials

Sets node authentication credentials for a given record.

ODRecordSetNodeCredentialsExtended

Sets node authentication credentials for a record using a specified authentication method.

ODRecordSetNodeCredentialsUsingKerberosCache

Sets credentials for interacting with a record’s node with the Kerberos cache.

Deprecated
ODRecordSetValue

Sets one or more attribute values of a record.

ODRecordSynchronize

Synchronizes a record with the directory to get current data and commit changes.

ODRecordVerifyPassword

Verifies a given password for a record.

ODRecordVerifyPasswordExtended

Verifies a given password for a record given a specified authentication method.

Working with Sessions

ODSessionCopyNodeNames

Returns the names of nodes registered in a given session.

ODSessionCreate

Creates a session to be passed to node functions.

ODSessionGetTypeID

Returns the type ID for a session.

Data Types

ODAttributeType

An Open Directory attribute type.

ODAuthenticationType

An Open Directory authentication type.

ODContextRef

An Open Directory context type.

ODNodeRef

An Open Directory node type.

ODQueryRef

An Open Directory query type.

ODRecordRef

An Open Directory record type.

ODSessionRef

An Open Directory session type.

ODMatchType

An Open Directory match type.

ODNodeType

An Open Directory node type.

ODQueryCallback

A callback function called as results from a scheduled query are returned.

ODRecordType

An Open Directory record type.

_ODAttributeType

An Open Directory attribute type.

_ODAuthenticationType

An Open Directory authentication type.

_ODRecordType

An Open Directory record type.

Constants

Session Keys

Keys used when specifying session information.

Node Types

Open Directory node types.

Match Types

Types of matches used for searches.

Record Types

Types of Open Directory records.

General Attribute Types

Types of Open Directory attributes.

Configuration Attribute Types

Types of Open Directory attributes specifically for use with configure nodes.

Authentication Types

Types of authentication available in Open Directory.