Skip to content

Commit 468721e

Browse files
Merge pull request #253409 from rolyon/rolyon-abac-custom-security-attributes-api-links
[Microsoft Entra] [Custom security attributes] Update PowerShell and Graph API links
2 parents 9841290 + 2317d59 commit 468721e

File tree

5 files changed

+92
-100
lines changed

5 files changed

+92
-100
lines changed

articles/active-directory/enterprise-users/users-custom-security-attributes.md

Lines changed: 47 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: active-directory
55
author: rolyon
66
manager: amycolannino
77
ms.author: rolyon
8-
ms.date: 09/08/2023
8+
ms.date: 10/01/2023
99
ms.topic: how-to
1010
ms.service: active-directory
1111
ms.subservice: enterprise-users
@@ -134,10 +134,9 @@ The following example assigns a custom security attribute with a string value to
134134

135135
# [PowerShell](#tab/ms-powershell)
136136

137-
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser?view=graph-powershell-beta&preserve-view=true)
137+
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser)
138138

139139
```powershell
140-
Select-MgProfile -Name "beta"
141140
$customSecurityAttributes = @{
142141
"Engineering" = @{
143142
"@odata.type" = "#Microsoft.DirectoryServices.CustomSecurityAttributeValue"
@@ -149,10 +148,10 @@ Update-MgUser -UserId $userId -CustomSecurityAttributes $customSecurityAttribute
149148

150149
# [Microsoft Graph](#tab/ms-graph)
151150

152-
[Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true)
151+
[Update user](/graph/api/user-update)
153152

154153
```http
155-
PATCH https://graph.microsoft.com/beta/users/{id}
154+
PATCH https://graph.microsoft.com/v1.0/users/{id}
156155
{
157156
"customSecurityAttributes":
158157
{
@@ -182,10 +181,9 @@ The following example assigns a custom security attribute with a multi-string va
182181

183182
# [PowerShell](#tab/ms-powershell)
184183

185-
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser?view=graph-powershell-beta&preserve-view=true)
184+
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser)
186185

187186
```powershell
188-
Select-MgProfile -Name "beta"
189187
$customSecurityAttributes = @{
190188
"Engineering" = @{
191189
"@odata.type" = "#Microsoft.DirectoryServices.CustomSecurityAttributeValue"
@@ -198,10 +196,10 @@ Update-MgUser -UserId $userId -CustomSecurityAttributes $customSecurityAttribute
198196

199197
# [Microsoft Graph](#tab/ms-graph)
200198

201-
[Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true)
199+
[Update user](/graph/api/user-update)
202200

203201
```http
204-
PATCH https://graph.microsoft.com/beta/users/{id}
202+
PATCH https://graph.microsoft.com/v1.0/users/{id}
205203
{
206204
"customSecurityAttributes":
207205
{
@@ -243,10 +241,9 @@ The following example assigns a custom security attribute with an integer value
243241

244242
# [PowerShell](#tab/ms-powershell)
245243

246-
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser?view=graph-powershell-beta&preserve-view=true)
244+
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser)
247245

248246
```powershell
249-
Select-MgProfile -Name "beta"
250247
$customSecurityAttributes = @{
251248
"Engineering" = @{
252249
"@odata.type" = "#Microsoft.DirectoryServices.CustomSecurityAttributeValue"
@@ -259,10 +256,10 @@ Update-MgUser -UserId $userId -CustomSecurityAttributes $customSecurityAttribute
259256

260257
# [Microsoft Graph](#tab/ms-graph)
261258

262-
[Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true)
259+
[Update user](/graph/api/user-update)
263260

264261
```http
265-
PATCH https://graph.microsoft.com/beta/users/{id}
262+
PATCH https://graph.microsoft.com/v1.0/users/{id}
266263
{
267264
"customSecurityAttributes":
268265
{
@@ -293,10 +290,9 @@ The following example assigns a custom security attribute with a multi-integer v
293290

294291
# [PowerShell](#tab/ms-powershell)
295292

296-
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser?view=graph-powershell-beta&preserve-view=true)
293+
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser)
297294

298295
```powershell
299-
Select-MgProfile -Name "beta"
300296
$customSecurityAttributes = @{
301297
"Engineering" = @{
302298
"@odata.type" = "#Microsoft.DirectoryServices.CustomSecurityAttributeValue"
@@ -309,10 +305,10 @@ Update-MgUser -UserId $userId -CustomSecurityAttributes $customSecurityAttribute
309305

310306
# [Microsoft Graph](#tab/ms-graph)
311307

312-
[Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true)
308+
[Update user](/graph/api/user-update)
313309

314310
```http
315-
PATCH https://graph.microsoft.com/beta/users/{id}
311+
PATCH https://graph.microsoft.com/v1.0/users/{id}
316312
{
317313
"customSecurityAttributes":
318314
{
@@ -343,10 +339,9 @@ The following example assigns a custom security attribute with a Boolean value t
343339

344340
# [PowerShell](#tab/ms-powershell)
345341

346-
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser?view=graph-powershell-beta&preserve-view=true)
342+
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser)
347343

348344
```powershell
349-
Select-MgProfile -Name "beta"
350345
$customSecurityAttributes = @{
351346
"Engineering" = @{
352347
"@odata.type" = "#Microsoft.DirectoryServices.CustomSecurityAttributeValue"
@@ -358,10 +353,10 @@ Update-MgUser -UserId $userId -CustomSecurityAttributes $customSecurityAttribute
358353

359354
# [Microsoft Graph](#tab/ms-graph)
360355

361-
[Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true)
356+
[Update user](/graph/api/user-update)
362357

363358
```http
364-
PATCH https://graph.microsoft.com/beta/users/{id}
359+
PATCH https://graph.microsoft.com/v1.0/users/{id}
365360
{
366361
"customSecurityAttributes":
367362
{
@@ -391,10 +386,9 @@ The following example updates a custom security attribute assignment with an int
391386

392387
# [PowerShell](#tab/ms-powershell)
393388

394-
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser?view=graph-powershell-beta&preserve-view=true)
389+
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser)
395390

396391
```powershell
397-
Select-MgProfile -Name "beta"
398392
$customSecurityAttributes = @{
399393
"Engineering" = @{
400394
"@odata.type" = "#Microsoft.DirectoryServices.CustomSecurityAttributeValue"
@@ -407,10 +401,10 @@ Update-MgUser -UserId $userId -CustomSecurityAttributes $customSecurityAttribute
407401

408402
# [Microsoft Graph](#tab/ms-graph)
409403

410-
[Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true)
404+
[Update user](/graph/api/user-update)
411405

412406
```http
413-
PATCH https://graph.microsoft.com/beta/users/{id}
407+
PATCH https://graph.microsoft.com/v1.0/users/{id}
414408
{
415409
"customSecurityAttributes":
416410
{
@@ -441,10 +435,9 @@ The following example updates a custom security attribute assignment with a Bool
441435

442436
# [PowerShell](#tab/ms-powershell)
443437

444-
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser?view=graph-powershell-beta&preserve-view=true)
438+
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser)
445439

446440
```powershell
447-
Select-MgProfile -Name "beta"
448441
$customSecurityAttributes = @{
449442
"Engineering" = @{
450443
"@odata.type" = "#Microsoft.DirectoryServices.CustomSecurityAttributeValue"
@@ -456,10 +449,10 @@ Update-MgUser -UserId $userId -CustomSecurityAttributes $customSecurityAttribute
456449

457450
# [Microsoft Graph](#tab/ms-graph)
458451

459-
[Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true)
452+
[Update user](/graph/api/user-update)
460453

461454
```http
462-
PATCH https://graph.microsoft.com/beta/users/{id}
455+
PATCH https://graph.microsoft.com/v1.0/users/{id}
463456
{
464457
"customSecurityAttributes":
465458
{
@@ -489,10 +482,9 @@ The following example updates a custom security attribute assignment with a mult
489482

490483
# [PowerShell](#tab/ms-powershell)
491484

492-
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser?view=graph-powershell-beta&preserve-view=true)
485+
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser)
493486

494487
```powershell
495-
Select-MgProfile -Name "beta"
496488
$customSecurityAttributes = @{
497489
"Engineering" = @{
498490
"@odata.type" = "#Microsoft.DirectoryServices.CustomSecurityAttributeValue"
@@ -505,10 +497,10 @@ Update-MgUser -UserId $userId -CustomSecurityAttributes $customSecurityAttribute
505497

506498
# [Microsoft Graph](#tab/ms-graph)
507499

508-
[Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true)
500+
[Update user](/graph/api/user-update)
509501

510502
```http
511-
PATCH https://graph.microsoft.com/beta/users/{id}
503+
PATCH https://graph.microsoft.com/v1.0/users/{id}
512504
{
513505
"customSecurityAttributes":
514506
{
@@ -545,10 +537,9 @@ The following example gets the custom security attribute assignments for a user.
545537

546538
# [PowerShell](#tab/ms-powershell)
547539

548-
[Get-MgUser](/powershell/module/microsoft.graph.users/get-mguser?view=graph-powershell-beta&preserve-view=true)
540+
[Get-MgUser](/powershell/module/microsoft.graph.users/get-mguser)
549541

550542
```powershell
551-
Select-MgProfile -Name "beta"
552543
$userAttributes = Get-MgUser -UserId $userId -Property "customSecurityAttributes"
553544
$userAttributes.CustomSecurityAttributes.AdditionalProperties | Format-List
554545
$userAttributes.CustomSecurityAttributes.AdditionalProperties.Engineering
@@ -587,15 +578,15 @@ If there are no custom security attributes assigned to the user or if the callin
587578

588579
# [Microsoft Graph](#tab/ms-graph)
589580

590-
[Get user](/graph/api/user-get?view=graph-rest-beta&preserve-view=true)
581+
[Get user](/graph/api/user-get)
591582

592583
```http
593-
GET https://graph.microsoft.com/beta/users/{id}?$select=customSecurityAttributes
584+
GET https://graph.microsoft.com/v1.0/users/{id}?$select=customSecurityAttributes
594585
```
595586

596587
```http
597588
{
598-
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users(customSecurityAttributes)/$entity",
589+
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(customSecurityAttributes)/$entity",
599590
"customSecurityAttributes": {
600591
"Engineering": {
601592
"@odata.type": "#microsoft.graph.customSecurityAttributeValue",
@@ -650,10 +641,9 @@ The following example lists all users with a custom security attribute assignmen
650641

651642
# [PowerShell](#tab/ms-powershell)
652643

653-
[Get-MgUser](/powershell/module/microsoft.graph.users/get-mguser?view=graph-powershell-beta&preserve-view=true)
644+
[Get-MgUser](/powershell/module/microsoft.graph.users/get-mguser)
654645

655646
```powershell
656-
Select-MgProfile -Name "beta"
657647
$userAttributes = Get-MgUser -CountVariable CountVar -Property "id,displayName,customSecurityAttributes" -Filter "customSecurityAttributes/Marketing/AppCountry eq 'Canada'" -ConsistencyLevel eventual
658648
$userAttributes | select Id,DisplayName,CustomSecurityAttributes
659649
$userAttributes.CustomSecurityAttributes.AdditionalProperties | Format-List
@@ -679,16 +669,16 @@ Value : {[@odata.type, #microsoft.graph.customSecurityAttributeValue], [AppCount
679669

680670
# [Microsoft Graph](#tab/ms-graph)
681671

682-
[List users](/graph/api/user-list?view=graph-rest-beta&preserve-view=true)
672+
[List users](/graph/api/user-list)
683673

684674
```http
685-
GET https://graph.microsoft.com/beta/users?$count=true&$select=id,displayName,customSecurityAttributes&$filter=customSecurityAttributes/Marketing/AppCountry eq 'Canada'
675+
GET https://graph.microsoft.com/v1.0/users?$count=true&$select=id,displayName,customSecurityAttributes&$filter=customSecurityAttributes/Marketing/AppCountry eq 'Canada'
686676
ConsistencyLevel: eventual
687677
```
688678

689679
```http
690680
{
691-
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users(id,displayName,customSecurityAttributes)",
681+
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(id,displayName,customSecurityAttributes)",
692682
"@odata.count": 2,
693683
"value": [
694684
{
@@ -748,10 +738,9 @@ The following example lists all users with a custom security attribute assignmen
748738

749739
# [PowerShell](#tab/ms-powershell)
750740

751-
[Get-MgUser](/powershell/module/microsoft.graph.users/get-mguser?view=graph-powershell-beta&preserve-view=true)
741+
[Get-MgUser](/powershell/module/microsoft.graph.users/get-mguser)
752742

753743
```powershell
754-
Select-MgProfile -Name "beta"
755744
$userAttributes = Get-MgUser -CountVariable CountVar -Property "id,displayName,customSecurityAttributes" -Filter "startsWith(customSecurityAttributes/Marketing/EmployeeId,'GS')" -ConsistencyLevel eventual
756745
$userAttributes | select Id,DisplayName,CustomSecurityAttributes
757746
$userAttributes.CustomSecurityAttributes.AdditionalProperties | Format-List
@@ -781,16 +770,16 @@ Value : {[@odata.type, #microsoft.graph.customSecurityAttributeValue], [Employee
781770

782771
# [Microsoft Graph](#tab/ms-graph)
783772

784-
[List users](/graph/api/user-list?view=graph-rest-beta&preserve-view=true)
773+
[List users](/graph/api/user-list)
785774

786775
```http
787-
GET https://graph.microsoft.com/beta/users?$count=true&$select=id,displayName,customSecurityAttributes&$filter=startsWith(customSecurityAttributes/Marketing/EmployeeId,'GS')
776+
GET https://graph.microsoft.com/v1.0/users?$count=true&$select=id,displayName,customSecurityAttributes&$filter=startsWith(customSecurityAttributes/Marketing/EmployeeId,'GS')
788777
ConsistencyLevel: eventual
789778
```
790779

791780
```http
792781
{
793-
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users(id,displayName,customSecurityAttributes)",
782+
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(id,displayName,customSecurityAttributes)",
794783
"@odata.count": 3,
795784
"value": [
796785
{
@@ -864,10 +853,9 @@ The following example lists all users with a custom security attribute assignmen
864853

865854
# [PowerShell](#tab/ms-powershell)
866855

867-
[Get-MgUser](/powershell/module/microsoft.graph.users/get-mguser?view=graph-powershell-beta&preserve-view=true)
856+
[Get-MgUser](/powershell/module/microsoft.graph.users/get-mguser)
868857

869858
```powershell
870-
Select-MgProfile -Name "beta"
871859
$userAttributes = Get-MgUser -CountVariable CountVar -Property "id,displayName,customSecurityAttributes" -Filter "customSecurityAttributes/Marketing/AppCountry ne 'Canada'" -ConsistencyLevel eventual
872860
$userAttributes | select Id,DisplayName,CustomSecurityAttributes
873861
```
@@ -884,16 +872,16 @@ d5a1c025-2d79-4ad3-9217-91ac3a4ed8b8 Joe Microsoft.Graph.Po
884872

885873
# [Microsoft Graph](#tab/ms-graph)
886874

887-
[List users](/graph/api/user-list?view=graph-rest-beta&preserve-view=true)
875+
[List users](/graph/api/user-list)
888876

889877
```http
890-
GET https://graph.microsoft.com/beta/users?$count=true&$select=id,displayName,customSecurityAttributes&$filter=customSecurityAttributes/Marketing/AppCountry ne 'Canada'
878+
GET https://graph.microsoft.com/v1.0/users?$count=true&$select=id,displayName,customSecurityAttributes&$filter=customSecurityAttributes/Marketing/AppCountry ne 'Canada'
891879
ConsistencyLevel: eventual
892880
```
893881

894882
```http
895883
{
896-
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users(id,displayName,customSecurityAttributes)",
884+
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(id,displayName,customSecurityAttributes)",
897885
"@odata.count": 47,
898886
"value": [
899887
{
@@ -995,15 +983,15 @@ $params = @{
995983
}
996984
}
997985
}
998-
Invoke-MgGraphRequest -Method PATCH -Uri "https://graph.microsoft.com/beta/users/$userId" -Body $params
986+
Invoke-MgGraphRequest -Method PATCH -Uri "https://graph.microsoft.com/v1.0/users/$userId" -Body $params
999987
```
1000988

1001989
# [Microsoft Graph](#tab/ms-graph)
1002990

1003-
[Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true)
991+
[Update user](/graph/api/user-update)
1004992

1005993
```http
1006-
PATCH https://graph.microsoft.com/beta/users/{id}
994+
PATCH https://graph.microsoft.com/v1.0/users/{id}
1007995
{
1008996
"customSecurityAttributes":
1009997
{
@@ -1032,10 +1020,9 @@ The following example removes a multi-valued custom security attribute assignmen
10321020

10331021
# [PowerShell](#tab/ms-powershell)
10341022

1035-
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser?view=graph-powershell-beta&preserve-view=true)
1023+
[Update-MgUser](/powershell/module/microsoft.graph.users/update-mguser)
10361024

10371025
```powershell
1038-
Select-MgProfile -Name "beta"
10391026
$customSecurityAttributes = @{
10401027
"Engineering" = @{
10411028
"@odata.type" = "#Microsoft.DirectoryServices.CustomSecurityAttributeValue"
@@ -1047,10 +1034,10 @@ Update-MgUser -UserId $userId -CustomSecurityAttributes $customSecurityAttribute
10471034

10481035
# [Microsoft Graph](#tab/ms-graph)
10491036

1050-
[Update user](/graph/api/user-update?view=graph-rest-beta&preserve-view=true)
1037+
[Update user](/graph/api/user-update)
10511038

10521039
```http
1053-
PATCH https://graph.microsoft.com/beta/users/{id}
1040+
PATCH https://graph.microsoft.com/v1.0/users/{id}
10541041
{
10551042
"customSecurityAttributes":
10561043
{

0 commit comments

Comments
 (0)