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

# xpc_connection_get_asid(_:)

Returns the audit session identifier of the remote peer.

```
func xpc_connection_get_asid(_ connection: xpc_connection_t) -> au_asid_t
```

## Parameters

`connection`

The connection object which is to be examined.

## Return Value

The audit session ID of the remote peer at the time the connection was made.

---

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)