# Get a workspace assignment for a principal

Launch stage: GA

`GET /api/2.0/identity/{name=workspace-assignments/*}`

Gets a principal's direct assignment to this workspace, including its effective entitlements.
 Returns an error if the principal isn't assigned directly.

API scopes: identity

## Path parameters

- `name` (string, required)
  The resource name of the assignment, in the format `workspace-assignments/{principal_id}`.

## Returns

Returns the WorkspaceAssignment object.

## Response

```json
{
  "name": "string",
  "parent": "string",
  "principal_type": "USER",
  "principal_id": 0,
  "workspace_id": 0,
  "account_id": "string",
  "entitlements": [
    "WORKSPACE_ACCESS"
  ],
  "effective_entitlements": [
    "WORKSPACE_ACCESS"
  ]
}
```

