---
title: "ODSessionCopyNodeNames(_:_:_:)"
framework: opendirectory
role: symbol
role_heading: Function
path: "opendirectory/odsessioncopynodenames(_:_:_:)"
---

# ODSessionCopyNodeNames(_:_:_:)

Returns the names of nodes registered in a given session.

## Declaration

```swift
func ODSessionCopyNodeNames(_ allocator: CFAllocator!, _ session: ODSessionRef!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Unmanaged<CFArray>!
```

## Parameters

- `allocator`: The memory allocator to use. If NULL, the default allocator is used.
- `session`: The session.
- `error`: An error reference for error details. Can be NULL.

## Return Value

Return Value An array of valid node names in the given session.

## See Also

### Working with Sessions

- [ODSessionCreate(_:_:_:)](opendirectory/odsessioncreate(_:_:_:).md)
- [ODSessionGetTypeID()](opendirectory/odsessiongettypeid().md)
