---
title: "SessionGetInfo(_:_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/sessiongetinfo(_:_:_:)"
---

# SessionGetInfo(_:_:_:)

Obtains information about a security session.

## Declaration

```swift
func SessionGetInfo(_ session: SecuritySessionId, _ sessionId: UnsafeMutablePointer<SecuritySessionId>?, _ attributes: UnsafeMutablePointer<SessionAttributeBits>?) -> OSStatus
```

## Parameters

- `session`: The session you are asking about. You can use one of the special sessions given in doc://com.apple.security/documentation/Security/session-id-values, for example to ask about your own session.
- `sessionId`: A pointer to a doc://com.apple.security/documentation/Security/SecuritySessionId value that the function populates with the actual session ID for the session you asked about. This value will not be one of the special values from doc://com.apple.security/documentation/Security/session-id-values, but will instead be an actual session ID.
- `attributes`: A pointer to a doc://com.apple.security/documentation/Security/SessionAttributeBits structure that the function fills with the attribute bits for the session.

## Return Value

Return Value A result code. See Sessions API Result Codes.

## Discussion

Discussion You can ask about any session whose identifier you know. Use the callerSecuritySession constant to ask about your own session (the one your process is in).
