Disconnect by User ID and Device ID API
Terminate a VPN connection using the user identifier and device identifier combination
Disconnect by User ID and Device ID API
Terminate VPN connections using user and device identifiers. Ideal when you know the user and device but don't have the session ID handy.
User-Based
Target connections by user identity rather than session.
Device Specific
Disconnect a particular device without affecting others.
Quick Action
No need to look up session IDs first.
Endpoint Overview
/graphqlDisconnect an active VPN session by specifying the user ID and device ID combination. All sessions matching this combination will be terminated.
Request Parameters
userIdInt!RequiredThe unique identifier of the user whose connection should be terminated.
deviceIdInt!RequiredThe unique identifier of the device to disconnect.
GraphQL Mutation
mutation disconnectByUserIdAndDeviceId($userId: Int!, $deviceId: Int!) {
disconnectByUserIdAndDeviceId(userId: $userId, deviceId: $deviceId)
}Variables:
{
"userId": 12345,
"deviceId": 67890
}HTTP Request:
curl -X POST https://api.orbnet.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
-d '{
"query": "mutation disconnectByUserIdAndDeviceId($userId: Int!, $deviceId: Int!) { disconnectByUserIdAndDeviceId(userId: $userId, deviceId: $deviceId) }",
"variables": {
"userId": 12345,
"deviceId": 67890
}
}'Response
{
"data": {
"disconnectByUserIdAndDeviceId": true
}
}{
"errors": [
{
"message": "No active session found for this user and device combination",
"path": ["disconnectByUserIdAndDeviceId"],
"extensions": {
"code": "SESSION_NOT_FOUND"
}
}
],
"data": null
}{
"errors": [
{
"message": "User or device not found",
"path": ["disconnectByUserIdAndDeviceId"],
"extensions": {
"code": "NOT_FOUND"
}
}
],
"data": null
}When to Use This Method
Known User & Device
When you have user and device IDs from your management system.
Support Tickets
User reports issues with a specific device - disconnect to reset connection.
Account Security
Terminate connections from a specific device after security concerns.
Device Troubleshooting
Force reconnection to resolve connectivity issues on a device.
Best Practices
Verify IDs
Confirm both user ID and device ID before disconnecting.
Check Active Sessions
Query online sessions to verify connection exists.
Document Actions
Log disconnect operations for audit trails.
User Communication
Inform user if disconnection was intentional.
Related Endpoints
Multiple Sessions
If a device has multiple active sessions, all sessions for that user/device combination will be disconnected. Use disconnect by session ID for more granular control.
Need Session-Level Control?
For more precise disconnection targeting individual sessions, use the Disconnect by Session ID API.