You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### Assign a custom security attribute with a multi-string value to a user
130
132
133
+
Use the [Set-AzureADMSUser](/powershell/module/azuread/set-azureadmsuser) command to assign a custom security attribute with a multi-string value to a user.
#### Update a custom security attribute with a multi-string value for a user
148
152
153
+
Use the [Set-AzureADMSUser](/powershell/module/azuread/set-azureadmsuser) command to update a custom security attribute with a multi-string value for a user.
To manage custom security attribute assignments for users in your Azure AD organization, you can use the Microsoft Graph API. The following API calls can be made to manage assignments.
173
+
To manage custom security attribute assignments for users in your Azure AD organization, you can use the Microsoft Graph API. The following API calls can be made to manage assignments. For more information, see [Assign, update, or remove custom security attributes using the Microsoft Graph API](/graph/custom-security-attributes-examples).
168
174
169
175
#### Get the custom security attribute assignments for a user
170
176
177
+
Use the [Get a user](/graph/api/user-get?view=graph-rest-beta&preserve-view=true) API to get the custom security attribute assignments for a user.
178
+
171
179
```http
172
180
GET https://graph.microsoft.com/beta/users/{id}?$select=customSecurityAttributes
173
181
```
@@ -182,6 +190,8 @@ If there are no custom security attributes assigned to the user or if the callin
182
190
183
191
#### Assign a custom security attribute with a string value to a user
184
192
193
+
Use the [Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true) API to assign a custom security attribute with a string value to a user.
#### Assign a custom security attribute with a multi-string value to a user
205
215
216
+
Use the [Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true) API to assign a custom security attribute with a multi-string value to a user.
#### Assign a custom security attribute with an integer value to a user
227
239
240
+
Use the [Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true) API to assign a custom security attribute with an integer value to a user.
#### Assign a custom security attribute with a multi-integer value to a user
249
263
264
+
Use the [Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true) API to assign a custom security attribute with a multi-integer value to a user.
#### Assign a custom security attribute with a Boolean value to a user
271
287
288
+
Use the [Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true) API to assign a custom security attribute with a Boolean value to a user.
#### Update a custom security attribute with an integer value for a user
292
310
311
+
Use the [Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true) API to update a custom security attribute with an integer value for a user.
#### Update a custom security attribute with a Boolean value for a user
314
334
335
+
Use the [Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true) API to update a custom security attribute with a Boolean value for a user.
#### Remove a single-valued custom security attribute assignment from a user
335
357
336
-
To remove a single-valued custom security attribute assignment, set the value to null.
358
+
Use the [Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true) API to remove a single-valued custom security attribute assignment from a user by setting the value to null.
#### Remove a multi-valued custom security attribute assignment from a user
357
379
358
-
To remove a multi-valued custom security attribute assignment, set the value to an empty collection.
380
+
Use the [Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true) API to remove a multi-valued custom security attribute assignment from a user by setting the value to an empty collection.
#### Filter all users with an attribute that equals a value
379
401
380
-
The following example, retrieves users with an `AppCountry` attribute that equals `Canada`. You must add `ConsistencyLevel: eventual` in the header. You must also include `$count=true` to ensure the request is routed correctly.
402
+
Use the [List users](/graph/api/user-list?view=graph-rest-beta&preserve-view=true) API to filter all users with an attribute that equals a value. The following example, retrieves users with an `AppCountry` attribute that equals `Canada`. You must add `ConsistencyLevel: eventual` in the header. You must also include `$count=true` to ensure the request is routed correctly.
381
403
382
404
- Attribute set: `Marketing`
383
405
- Attribute: `AppCountry`
@@ -389,7 +411,7 @@ GET https://graph.microsoft.com/beta/users?$count=true&$select=id,displayName,cu
389
411
390
412
#### Filter all users with an attribute that starts with a value
391
413
392
-
The following example, retrieves users with an `EmployeeId` attribute that starts with `111`. You must add `ConsistencyLevel: eventual` in the header. You must also include `$count=true` to ensure the request is routed correctly.
414
+
Use the [List users](/graph/api/user-list?view=graph-rest-beta&preserve-view=true) API to filter all users with an attribute that starts with a value. The following example, retrieves users with an `EmployeeId` attribute that starts with `111`. You must add `ConsistencyLevel: eventual` in the header. You must also include `$count=true` to ensure the request is routed correctly.
393
415
394
416
- Attribute set: `Marketing`
395
417
- Attribute: `EmployeeId`
@@ -401,7 +423,7 @@ GET https://graph.microsoft.com/beta/users?$count=true&$select=id,displayName,cu
401
423
402
424
#### Filter all users with an attribute that does not equal a value
403
425
404
-
The following example, retrieves users with a `AppCountry` attribute that does not equal `Canada`. This query will also retrieve users that do not have the `AppCountry` attribute assigned. You must add `ConsistencyLevel: eventual` in the header. You must also include `$count=true` to ensure the request is routed correctly.
426
+
Use the [List users](/graph/api/user-list?view=graph-rest-beta&preserve-view=true) API to filter all users with an attribute that does not equal a value. The following example, retrieves users with a `AppCountry` attribute that does not equal `Canada`. This query will also retrieve users that do not have the `AppCountry` attribute assigned. You must add `ConsistencyLevel: eventual` in the header. You must also include `$count=true` to ensure the request is routed correctly.
0 commit comments