diff --git a/src/Resources/ResourceManager/Implementation/ManagedApplications/NewAzureManagedApplication.cs b/src/Resources/ResourceManager/Implementation/ManagedApplications/NewAzureManagedApplication.cs index f16a5712ed01..d3d4aaea8291 100644 --- a/src/Resources/ResourceManager/Implementation/ManagedApplications/NewAzureManagedApplication.cs +++ b/src/Resources/ResourceManager/Implementation/ManagedApplications/NewAzureManagedApplication.cs @@ -119,6 +119,9 @@ protected override void OnProcessRecord() odataQuery: null) .Result; + // Update location in the operation result if its not present. RPaaS does not populate it for us. + operationResult.LocationUri = operationResult.LocationUri ?? operationResult.AzureAsyncOperationUri; + var managementUri = this.GetResourcesClient() .GetResourceManagementRequestUri( resourceId: resourceId, diff --git a/src/Resources/Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagedApplicationTests/TestManagedApplicationCRUD.json b/src/Resources/Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagedApplicationTests/TestManagedApplicationCRUD.json index 31b68f1ab292..73ab34515c2d 100644 --- a/src/Resources/Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagedApplicationTests/TestManagedApplicationCRUD.json +++ b/src/Resources/Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagedApplicationTests/TestManagedApplicationCRUD.json @@ -232,9 +232,6 @@ "Pragma": [ "no-cache" ], - "Location": [ - "https://management.azure.com/subscriptions/e0f276d3-ee09-4a8b-a527-e2a6ac2ee309/resourceGroups/ps4844/providers/Microsoft.Solutions/locations/EastUS2EUAP/operationStatuses/eyJmdWxseVF1YWxpZmllZEFwcGxpYW5jZUlkIjoiL3N1YnNjcmlwdGlvbnMvZTBmMjc2ZDMtZWUwOS00YThiLWE1MjctZTJhNmFjMmVlMzA5L3Jlc291cmNlR3JvdXBzL3BzNDg0NC9wcm92aWRlcnMvTWljcm9zb2Z0LlNvbHV0aW9ucy9hcHBsaWNhdGlvbnMvcHM4NzA0Iiwiam9iSWQiOiJBcHBsaWFuY2VQcm92aXNpb25pbmdKb2I6MkRSR0E6MkRQUzQ4NDQ6MkRQUzg3MDQifQ?api-version=2017-09-01" - ], "Retry-After": [ "0" ], diff --git a/src/Resources/Resources/ChangeLog.md b/src/Resources/Resources/ChangeLog.md index 1073d39c0113..29b852fc3c78 100644 --- a/src/Resources/Resources/ChangeLog.md +++ b/src/Resources/Resources/ChangeLog.md @@ -19,6 +19,7 @@ --> ## Upcoming Release +* Fixed an issue where location header was missing in the response from the service for New-AzManagedApplication. ## Version 6.6.1 * Added support for Azure resources deployment with parameters file using Bicep parameters syntax