<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "OpenDirectory",
  "identifier" : "/documentation/OpenDirectory/ODNode",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Open Directory"
    ],
    "preciseIdentifier" : "c:objc(cs)ODNode"
  },
  "title" : "ODNode"
}
-->

# ODNode

An `ODNode` object serves as a Cocoa wrapper for an Open Directory node.

```
class ODNode
```

## Topics

### Creating and Initializing a Node

[`-  initWithSession:name:error:`](/documentation/OpenDirectory/ODNode/init(session:name:))

Creates a node object with a specified session and name.

[`-  initWithSession:type:error:`](/documentation/OpenDirectory/ODNode/init(session:type:))

Creates a node object with a specified session and type.

[`+  nodeWithSession:name:error:`](/documentation/OpenDirectory/ODNode/nodeWithSession:name:error:)

Returns an autoreleased node object with a specified session and name.

[`+  nodeWithSession:type:error:`](/documentation/OpenDirectory/ODNode/nodeWithSession:type:error:)

Returns an autoreleased node object with a specified session and type.

### Querying a Node

[`-  customCall:sendData:error:`](/documentation/OpenDirectory/ODNode/customCall(_:send:))

Returns the result of a custom call to the node.

[`-  nodeDetailsForKeys:error:`](/documentation/OpenDirectory/ODNode/nodeDetails(forKeys:))

Returns a dictionary containing details about a node.

[`nodeName`](/documentation/OpenDirectory/ODNode/nodeName)

The node’s name.

[`-  subnodeNamesAndReturnError:`](/documentation/OpenDirectory/ODNode/subnodeNames())

Returns the names of subnodes for the node.

[`-  unreachableSubnodeNamesAndReturnError:`](/documentation/OpenDirectory/ODNode/unreachableSubnodeNames())

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

### Setting Node Credentials

[`-  setCredentialsWithRecordType:recordName:password:error:`](/documentation/OpenDirectory/ODNode/setCredentialsWithRecordType(_:recordName:password:))

Sets credentials for interacting with the node.

[`-  setCredentialsWithRecordType:authenticationType:authenticationItems:continueItems:context:error:`](/documentation/OpenDirectory/ODNode/setCredentialsWithRecordType(_:authenticationType:authenticationItems:continueItems:context:))

Sets the credentials for interaction with the node using other types of authentication available to Open Directory.

### Managing Node Records

[`-  createRecordWithRecordType:name:attributes:error:`](/documentation/OpenDirectory/ODNode/createRecord(withRecordType:name:attributes:))

Creates a record in a specified node with specified properties.

[`-  recordWithRecordType:name:attributes:error:`](/documentation/OpenDirectory/ODNode/record(withRecordType:name:attributes:))

Returns a record from the node with a specified type and name.

[`-  supportedAttributesForRecordType:error:`](/documentation/OpenDirectory/ODNode/supportedAttributes(forRecordType:))

Returns an array of attribute types supported by the node’s records.

[`-  supportedRecordTypesAndReturnError:`](/documentation/OpenDirectory/ODNode/supportedRecordTypes())

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

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)