<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SessionGetInfo(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@F@SessionGetInfo"
  },
  "title" : "SessionGetInfo(_:_:_:)"
}
-->

# SessionGetInfo(_:_:_:)

Obtains information about a security session.

```
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 [Session ID Values](/documentation/Security/session-id-values), for example to ask about your own session.

`sessionId`

A pointer to a [`SecuritySessionId`](/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 [Session ID Values](/documentation/Security/session-id-values), but will instead be an actual session ID.

`attributes`

A pointer to a [`SessionAttributeBits`](/documentation/Security/SessionAttributeBits) structure that the function fills with the attribute bits for the session.

## Return Value

A result code. See [Sessions API Result Codes](/documentation/Security/sessions-api-result-codes).

## Discussion

You can ask about any session whose identifier you know. Use the [`callerSecuritySession`](/documentation/Security/callerSecuritySession) constant to ask about your own session (the one your process is in).

---

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)