---
title: Assign, update, list, or remove custom security attributes for a user
description: Assign, update, list, or remove custom security attributes for a user in Microsoft Entra ID.
ms.date: 04/27/2026
ms.topic: how-to
ms.custom: it-pro, no-azure-ad-ps-ref, sfi-image-nochange
ai-usage: ai-assisted
### List all users and any custom security attribute assignments
The following example lists all users and any custom security attribute assignments. You must add `ConsistencyLevel=eventual` in the request or the header. You must also include `$count=true` to ensure the request is routed correctly.
# [PowerShell](#tab/ms-powershell)
[Get-MgUser](/powershell/module/microsoft.graph.users/get-mguser)
```powershell
$userAttributes = Get-MgUser -All -CountVariable CountVar -Property "id,displayName,customSecurityAttributes" -ConsistencyLevel eventual
$userAttributes | select Id,DisplayName,CustomSecurityAttributes
$userAttributes.CustomSecurityAttributes.AdditionalProperties | Format-List
---
title: Assign, update, list, or remove custom security attributes for a user
description: Assign, update, list, or remove custom security attributes for a user in Microsoft Entra ID.
ms.date: 05/11/2026
ms.topic: how-to
ms.custom: it-pro, no-azure-ad-ps-ref, sfi-image-nochange
ai-usage: ai-assisted
### List all users and any custom security attribute assignments
The following example lists all users and any custom security attribute assignments. Because this example uses only `$select` (no `$filter`, `$search`, `$count`, or `$orderby`), advanced query parameters aren't required. The List examples later in this article that use `$filter` on `customSecurityAttributes` do require `ConsistencyLevel=eventual` and `$count=true`. For more information, see [Advanced query capabilities on directory objects](/graph/aad-advanced-queries).
# [PowerShell](#tab/ms-powershell)
[Get-MgUser](/powershell/module/microsoft.graph.users/get-mguser)
```powershell
$userAttributes = Get-MgUser -All -Property "id,displayName,customSecurityAttributes"
$userAttributes | select Id,DisplayName,CustomSecurityAttributes
$userAttributes.CustomSecurityAttributes.AdditionalProperties | Format-List