Skip to content

Commit a7cb13d

Browse files
authored
Update to Microsoft.Azure.Management.Authorization 2.13.0-preview (#15731)
* auth v2.13 * empty * update other projects
1 parent b47f246 commit a7cb13d

File tree

25 files changed

+20375
-13497
lines changed

25 files changed

+20375
-13497
lines changed

src/DeploymentManager/DeploymentManager.Test/DeploymentManager.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<PackageReference Include="Microsoft.Azure.Management.DeploymentManager" Version="0.9.1-preview" />
1515
<PackageReference Include="Microsoft.Azure.Management.ManagedServiceIdentity" Version="0.10.0-preview" />
1616
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.5.0-preview" />
17-
<PackageReference Include="Microsoft.Azure.Management.Authorization" Version="2.12.0-preview" />
17+
<PackageReference Include="Microsoft.Azure.Management.Authorization" Version="2.13.0-preview" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

src/HPCCache/HPCCache.Test/Fixtures/HpcCacheTestContext.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,6 @@ public void AddRoleAssignment(HpcCacheTestContext context, string scope, string
283283
{
284284
RoleDefinitionId = roleDefinition.Id,
285285
PrincipalId = Constants.StorageCacheResourceProviderPrincipalId,
286-
287-
// The principal ID assigned to the role.
288-
// This maps to the ID inside the Active Directory.
289-
// It can point to a user, service principal, or security group.
290-
CanDelegate = false,
291286
};
292287

293288
authorizationManagementClient.RoleAssignments.Create(scope, assignmentName, newRoleAssignment);

src/HPCCache/HPCCache.Test/HPCCache.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</ItemGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="Microsoft.Azure.Management.Authorization" Version="2.11.0-preview" />
18+
<PackageReference Include="Microsoft.Azure.Management.Authorization" Version="2.13.0-preview" />
1919
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="14.5.0" />
2020
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.6.0" />
2121
<PackageReference Include="WindowsAzure.Storage" Version="9.3.0" />

src/HPCCache/HPCCache.sln

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ Global
4343
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
4444
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
4545
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.Build.0 = Release|Any CPU
46+
{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47+
{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Debug|Any CPU.Build.0 = Debug|Any CPU
48+
{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Release|Any CPU.ActiveCfg = Release|Any CPU
49+
{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Release|Any CPU.Build.0 = Release|Any CPU
4650
{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4751
{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
4852
{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Release|Any CPU.ActiveCfg = Release|Any CPU

src/Resources/Resources.Test/Resources.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.8.0-preview" />
15-
<PackageReference Include="Microsoft.Azure.Management.Authorization" Version="2.12.0-preview" />
15+
<PackageReference Include="Microsoft.Azure.Management.Authorization" Version="2.13.0-preview" />
1616
<PackageReference Include="Microsoft.Azure.Management.ManagementGroups" Version="1.1.1-preview" />
1717
</ItemGroup>
1818

src/Resources/Resources.Test/ScenarioTests/ProviderTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ function Test-AzureProviderOperation
151151
Assert-True { $action.Length -eq 0 }
152152

153153
# Get operations for non-existing provider
154-
$exceptionMessage = "Provider 'NonExistentProvider' not found.";
154+
$exceptionMessage = "Operation returned an invalid status code 'NotFound'";
155155
Assert-Throws { Get-AzProviderOperation NonExistentProvider/* } $exceptionMessage
156156

157157
# Get operations for non-existing provider

src/Resources/Resources.Test/ScenarioTests/RoleAssignmentTests.ps1

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ function Test-RaByScope
154154
Assert-AreEqual $scope $newAssignment.Scope
155155
Assert-AreEqual $users[0].DisplayName $newAssignment.DisplayName
156156

157+
# Start-Sleep -Seconds 300
158+
157159
VerifyRoleAssignmentDeleted $newAssignment
158160
}
159161

@@ -223,7 +225,7 @@ function Test-RaByResourceGroup
223225
Assert-AreEqual $definitionName $newAssignment.RoleDefinitionName
224226
Assert-AreEqual $users[0].DisplayName $newAssignment.DisplayName
225227

226-
#Start-Sleep -Seconds 300
228+
# Start-Sleep -Seconds 300
227229

228230
VerifyRoleAssignmentDeleted $newAssignment
229231
}
@@ -428,6 +430,8 @@ function Test-RaGetByUPNWithExpandPrincipalGroups
428430
# cleanup
429431
DeleteRoleAssignment $newAssignment
430432

433+
# Start-Sleep -Seconds 300
434+
431435
VerifyRoleAssignmentDeleted $newAssignment
432436
}
433437

@@ -475,6 +479,8 @@ function Test-RaDeletionByScope
475479
Assert-AreEqual $scope $newAssignment.Scope
476480
Assert-AreEqual $users[0].DisplayName $newAssignment.DisplayName
477481

482+
# Start-Sleep -Seconds 300
483+
478484
VerifyRoleAssignmentDeleted $newAssignment
479485
}
480486

@@ -586,7 +592,6 @@ function Test-RaDelegation
586592
Assert-AreEqual $definitionName $newAssignment.RoleDefinitionName
587593
Assert-AreEqual $scope $newAssignment.Scope
588594
Assert-AreEqual $users[0].DisplayName $newAssignment.DisplayName
589-
Assert-AreEqual $true $newAssignment.CanDelegate
590595

591596
# cleanup
592597
DeleteRoleAssignment $newAssignment
@@ -697,6 +702,8 @@ function VerifyRoleAssignmentDeleted
697702
{
698703
param([Parameter(Mandatory=$true)] [object] $roleAssignment)
699704

705+
# Start-Sleep -Seconds 600
706+
700707
$deletedRoleAssignment = Get-AzRoleAssignment -ObjectId $roleAssignment.ObjectId `
701708
-Scope $roleAssignment.Scope `
702709
-RoleDefinitionName $roleAssignment.RoleDefinitionName | where {$_.roleAssignmentId -eq $roleAssignment.roleAssignmentId}
@@ -863,8 +870,8 @@ function Test-UpdateRa{
863870

864871
# Given
865872
$RoleDefinitionId = "acdd72a7-3385-48ef-bd42-f606fba81ae7"
866-
$PrincipalId ="7aa123be-80d1-4aa8-8813-d6a34a6a52d0"
867-
$Scope = '/subscriptions/7ada13d9-fa86-4ea3-bcdc-7545cc0f1bb6'
873+
$PrincipalId ="a9bd2ca0-f2c6-41d5-81e7-4da601e7365a"
874+
$Scope = '/subscriptions/4004a9fd-d58e-48dc-aeb2-4a4aec58606f'
868875
$Description1 = "This test should not fail"
869876
$Condition1 = "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:Name] StringEqualsIgnoreCase 'foo_storage_container'"
870877
$ConditionVersion = "2.0"
@@ -1035,7 +1042,7 @@ function Test-CreateRAWhenIdNotExist
10351042
$RoleDefinitionId = "acdd72a7-3385-48ef-bd42-f606fba81ae7"
10361043
$PrincipalId ="6d764d35-6b3b-49ea-83f8-5c223b56eac5"
10371044
$Scope = '/subscriptions/70cff36b-c4f8-46ea-9655-9cfd44664763'
1038-
$ExpectedError = 'Exception calling "ExecuteCmdlet" with "0" argument(s): "Principal 6d764d356b3b49ea83f85c223b56eac5 does not exist in the directory 395544B0-BF41-429D-921F-E1CA2252FCF4."'
1045+
$ExpectedError = "Exception calling `"ExecuteCmdlet`" with `"0`" argument(s): `"Operation returned an invalid status code 'NotFound'`""
10391046

10401047
#When
10411048
$function = {New-AzRoleAssignmentWithId `

src/Resources/Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ProviderTests/TestAzureProviderOperation.json

Lines changed: 242 additions & 295 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
22
"Entries": [
33
{
4-
"RequestUri": "/395544B0-BF41-429D-921F-E1CA2252FCF4/getObjectsByObjectIds?api-version=1.6",
4+
"RequestUri": "/1273adef-00a3-4086-a51a-dbcce1857d36/getObjectsByObjectIds?api-version=1.6",
55
"EncodedRequestUri": "LzEyNzNhZGVmLTAwYTMtNDA4Ni1hNTFhLWRiY2NlMTg1N2QzNi9nZXRPYmplY3RzQnlPYmplY3RJZHM/YXBpLXZlcnNpb249MS42",
66
"RequestMethod": "POST",
77
"RequestBody": "{\r\n \"objectIds\": [\r\n \"6d764d35-6b3b-49ea-83f8-5c223b56eac5\"\r\n ],\r\n \"includeDirectoryObjectReferences\": true\r\n}",
88
"RequestHeaders": {
99
"x-ms-client-request-id": [
10-
"aba3b87d-5025-46e4-9eb2-1f3019d777cc"
10+
"4a118391-5288-4d3a-926b-3461ecf1da02"
1111
],
1212
"Accept-Language": [
1313
"en-US"
1414
],
1515
"User-Agent": [
16-
"FxVersion/4.6.29812.02",
16+
"FxVersion/4.6.30411.01",
1717
"OSName/Windows",
18-
"OSVersion/Microsoft.Windows.10.0.19042.",
19-
"Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/3.5.0.0"
18+
"OSVersion/Microsoft.Windows.10.0.19043.",
19+
"Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/3.5.1.0"
2020
],
2121
"Content-Type": [
2222
"application/json; charset=utf-8"
@@ -33,22 +33,22 @@
3333
"no-cache"
3434
],
3535
"ocp-aad-diagnostics-server-name": [
36-
"aCS2by0g0TCoJc1T34ZKoFNzdHDvvyvxykXR832B8uY="
36+
"8AxVNPrgvBWphAoH/ND9PWGcjIn4cwH9bsVNs+Y4nls="
3737
],
3838
"request-id": [
39-
"2fccf8eb-ff86-44cf-a774-3c381e633732"
39+
"27375d2f-c2eb-428e-98d5-79d9310da1a0"
4040
],
4141
"client-request-id": [
42-
"aba3b87d-5025-46e4-9eb2-1f3019d777cc"
42+
"4a118391-5288-4d3a-926b-3461ecf1da02"
4343
],
4444
"x-ms-dirapi-data-contract-version": [
4545
"1.6"
4646
],
4747
"ocp-aad-session-key": [
48-
"DxfXGD_58fNB0ZekRML94-bX0vcHD4s0hViaYFTCE-zE_L74AFqfftUBbZz0YBk2TahpnR4c5I5llfSbAb0jCiCZg4ZaiE7-hDvOPlQfTkqj_30fZO715qwprKk9HWIz.jfmF7CXA-cnTd5KQRLaNBYEBTAQffQ0JIK_UoifPV-M"
48+
"6dixdHRGmwsiNakv5L4I_TP7JFXLuYZzgE9OTEKiFpCBeSn1QsmxaMiaUHbZggKAlneZfCQrPUU8C7T38dv-DN4EqiRtChRhf95APfX245hc2Z2QtAFcBQM0Gu_60lKW.EdCj8rECj7c4tlv5DagHJfUuoS25aGlc0pzXzGY7Jkc"
4949
],
5050
"Duration": [
51-
"504755"
51+
"733850"
5252
],
5353
"x-ms-resource-unit": [
5454
"3"
@@ -69,47 +69,47 @@
6969
"*"
7070
],
7171
"Date": [
72-
"Fri, 26 Mar 2021 22:55:46 GMT"
73-
],
74-
"Content-Length": [
75-
"121"
72+
"Fri, 03 Sep 2021 20:44:35 GMT"
7673
],
7774
"Content-Type": [
7875
"application/json; odata=minimalmetadata; streaming=true; charset=utf-8"
7976
],
8077
"Expires": [
8178
"-1"
8279
],
80+
"Content-Length": [
81+
"121"
82+
],
8383
"Retry-After": [
8484
"0"
8585
]
8686
},
87-
"ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/395544B0-BF41-429D-921F-E1CA2252FCF4/$metadata#directoryObjects\",\r\n \"value\": []\r\n}",
87+
"ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1273adef-00a3-4086-a51a-dbcce1857d36/$metadata#directoryObjects\",\r\n \"value\": []\r\n}",
8888
"StatusCode": 200
8989
},
9090
{
91-
"RequestUri": "//subscriptions/70cff36b-c4f8-46ea-9655-9cfd44664763/providers/Microsoft.Authorization/roleAssignments/734de5f5-c680-41c0-8beb-67b98c3539d5?api-version=2020-04-01-preview",
92-
"EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzQwMDRhOWZkLWQ1OGUtNDhkYy1hZWIyLTRhNGFlYzU4NjA2Zi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZUFzc2lnbm1lbnRzLzczNGRlNWY1LWM2ODAtNDFjMC04YmViLTY3Yjk4YzM1MzlkNT9hcGktdmVyc2lvbj0yMDIwLTA0LTAxLXByZXZpZXc=",
91+
"RequestUri": "//subscriptions/70cff36b-c4f8-46ea-9655-9cfd44664763/providers/Microsoft.Authorization/roleAssignments/734de5f5-c680-41c0-8beb-67b98c3539d5?api-version=2020-08-01-preview",
92+
"EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzcwY2ZmMzZiLWM0ZjgtNDZlYS05NjU1LTljZmQ0NDY2NDc2My9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZUFzc2lnbm1lbnRzLzczNGRlNWY1LWM2ODAtNDFjMC04YmViLTY3Yjk4YzM1MzlkNT9hcGktdmVyc2lvbj0yMDIwLTA4LTAxLXByZXZpZXc=",
9393
"RequestMethod": "PUT",
94-
"RequestBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/70cff36b-c4f8-46ea-9655-9cfd44664763/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"6d764d35-6b3b-49ea-83f8-5c223b56eac5\",\r\n \"canDelegate\": false\r\n }\r\n}",
94+
"RequestBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/70cff36b-c4f8-46ea-9655-9cfd44664763/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"6d764d35-6b3b-49ea-83f8-5c223b56eac5\"\r\n }\r\n}",
9595
"RequestHeaders": {
9696
"x-ms-client-request-id": [
97-
"48274ed4-e27c-4c47-8b83-e91086d065e9"
97+
"3557a1e2-bda4-4dd2-941a-dfca482ffb40"
9898
],
9999
"Accept-Language": [
100100
"en-US"
101101
],
102102
"User-Agent": [
103-
"FxVersion/4.6.29812.02",
103+
"FxVersion/4.6.30411.01",
104104
"OSName/Windows",
105-
"OSVersion/Microsoft.Windows.10.0.19042.",
106-
"Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/2.12.0.0"
105+
"OSVersion/Microsoft.Windows.10.0.19043.",
106+
"Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/2.13.0.0"
107107
],
108108
"Content-Type": [
109109
"application/json; charset=utf-8"
110110
],
111111
"Content-Length": [
112-
"281"
112+
"254"
113113
]
114114
},
115115
"ResponseHeaders": {
@@ -119,49 +119,47 @@
119119
"Pragma": [
120120
"no-cache"
121121
],
122+
"x-ms-failure-cause": [
123+
"gateway"
124+
],
122125
"x-ms-request-id": [
123-
"cbf557b4-3bdf-43a8-92f3-02e7e65840f6"
126+
"1d5abd6f-06c4-46eb-88bc-4367805ddbd9"
124127
],
125-
"X-Content-Type-Options": [
126-
"nosniff"
128+
"x-ms-correlation-request-id": [
129+
"1d5abd6f-06c4-46eb-88bc-4367805ddbd9"
130+
],
131+
"x-ms-routing-request-id": [
132+
"WESTUS2:20210903T204436Z:1d5abd6f-06c4-46eb-88bc-4367805ddbd9"
127133
],
128134
"Strict-Transport-Security": [
129135
"max-age=31536000; includeSubDomains"
130136
],
131-
"Set-Cookie": [
132-
"x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly"
133-
],
134-
"x-ms-ratelimit-remaining-subscription-writes": [
135-
"1197"
136-
],
137-
"x-ms-correlation-request-id": [
138-
"41411b36-c40d-48a0-bf9c-f46012e7decf"
139-
],
140-
"x-ms-routing-request-id": [
141-
"WESTUS2:20210326T225546Z:41411b36-c40d-48a0-bf9c-f46012e7decf"
137+
"X-Content-Type-Options": [
138+
"nosniff"
142139
],
143140
"Date": [
144-
"Fri, 26 Mar 2021 22:55:46 GMT"
145-
],
146-
"Content-Length": [
147-
"163"
141+
"Fri, 03 Sep 2021 20:44:36 GMT"
148142
],
149143
"Content-Type": [
150144
"application/json; charset=utf-8"
151145
],
152146
"Expires": [
153147
"-1"
154148
],
149+
"Content-Length": [
150+
"129"
151+
],
155152
"Retry-After": [
156153
"0"
157154
]
158155
},
159-
"ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"PrincipalNotFound\",\r\n \"message\": \"Principal 6d764d356b3b49ea83f85c223b56eac5 does not exist in the directory 395544B0-BF41-429D-921F-E1CA2252FCF4.\"\r\n }\r\n}",
160-
"StatusCode": 400
156+
"ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"SubscriptionNotFound\",\r\n \"message\": \"The subscription '70cff36b-c4f8-46ea-9655-9cfd44664763' could not be found.\"\r\n }\r\n}",
157+
"StatusCode": 404
161158
}
162159
],
163160
"Names": {},
164161
"Variables": {
162+
"TenantId": "1273adef-00a3-4086-a51a-dbcce1857d36",
165163
"SubscriptionId": "70cff36b-c4f8-46ea-9655-9cfd44664763"
166164
}
167165
}

src/Resources/Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaById.json

Lines changed: 1691 additions & 967 deletions
Large diffs are not rendered by default.

src/Resources/Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByResource.json

Lines changed: 1608 additions & 878 deletions
Large diffs are not rendered by default.

src/Resources/Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByResourceGroup.json

Lines changed: 6049 additions & 5321 deletions
Large diffs are not rendered by default.

src/Resources/Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByScope.json

Lines changed: 1732 additions & 921 deletions
Large diffs are not rendered by default.

src/Resources/Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByUpn.json

Lines changed: 1734 additions & 923 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)