Skip to content

Edit failure response for New-AzResource #28155

@ljernigan

Description

@ljernigan

Description

I work on a resource provider and we want to give customers more detailed errors. I figured out how to update the operation result, but I can't figure out how to display custom error messages in Powershell. The example I have below is where I try to allocate a BaremetalConnection with an IP that is already allocated to another BareMetalConnection. When our resource provider goes to provision a nic, the IP is taken and the call fails as expected, but I'm not sure how to replace the generic error ("resource is in the 'Failed' state") with a more specific one.

Issue script & Debug output

**********************
PowerShell transcript start
Start time: 20250708172339
Username: SandboxHost-638875751513000292\lauren
RunAs User: SandboxHost-638875751513000292\lauren
Configuration Name: 
Machine: SandboxHost-638875751513000292 (Unix 6.1.124.1)
Host Application: /opt/microsoft/powershell/7/pwsh.dll -NoLogo
Process ID: 7483
PSVersion: 7.5.1
PSEdition: Core
GitCommitId: 7.5.1
OS: Microsoft Azure Linux 3.0
Platform: Unix
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1, 6.0, 7.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
WSManStackVersion: 3.0
**********************
Transcript started, output file is ./out.txt
PS /home/lauren> $prop = @{
  deviceid= "8be8b3e0-a3ff-4ae0-a443-dcc37cc68e2a"
  ipaddress= "10.0.10.44"
  subnetresourceid= "/subscriptions/0a6b0715-421d-4cc2-8259-7e7761b45e79/resourceGroups/ljernigan-testing/providers/Microsoft.Network/virtualNetworks/ljernigan-policy-test-vnet/subnets/oracle"
 }
PS /home/lauren> new-azresource -Location eastus2euap -Properties $prop -resourceId "/subscriptions/0a6b0715-421d-4cc2-8259-7e7761b45e79/resourceGroups/ljernigan-testing/providers/Microsoft.BareMetal/BareMetalConnections/june-26-test-1" -Debug
DEBUG: 5:23:49 PM - [ConfigManager] Got [True] from [DisplaySecretsWarning], Module = [], Cmdlet = [].
DEBUG: 5:23:49 PM - NewAzureResourceCmdlet begin processing with ParameterSet 'ByResourceId'.
DEBUG: 5:23:49 PM - using account id 'MSI@50342'...
DEBUG: 5:23:49 PM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [Az.Resources], Cmdlet = [New-AzResource]. Returning default value [True].
Confirm
Are you sure you want to perform this action?
Performing the operation "Creating the resource..." on target "/subscriptions/0a6b0715-421d-4cc2-8259-7e7761b45e79/resourceGroups/ljernigan-testing/providers/Microsoft.BareMetal/BareMetalConnections/june-26-test-1".
&Yes  Yes to &All  &No  No to A&ll  &Suspend
Y
Confirm
Are you sure you want to create the following resource: /subscriptions/0a6b0715-421d-4cc2-8259-7e7761b45e79/resourceGroups/ljernigan-testing/providers/Microsoft.BareMetal/BareMetalConnections/june-26-test-1
&Yes  &No  &Suspend
Y
DEBUG: [Common.Authentication]: Authenticating using Account: 'MSI@50342', environment: 'AzureCloud', tenant: '33e01921-4d64-4f8c-a055-5bdaffd5e33d'
DEBUG: 5:23:52 PM - [ConfigManager] Got nothing from [DisableInstanceDiscovery], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 5:23:52 PM - [ManagedServiceIdentityAuthenticator] Calling ManagedIdentityCredential.GetTokenAsync - TenantId:'33e01921-4d64-4f8c-a055-5bdaffd5e33d', Scopes:'https://management.core.windows.net/', UserId:''
DEBUG: ManagedIdentityCredential.GetToken invoked. Scopes: [ https://management.core.windows.net/ ] ParentRequestId:
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:52Z - fd85dc97-0fb0-4d51-a1d4-70c04de30a11] MSAL MSAL.CoreCLR with assembly version '4.65.0.0'. CorrelationId(fd85dc97-0fb0-4d51-a1d4-70c04de30a11)
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:52Z - fd85dc97-0fb0-4d51-a1d4-70c04de30a11] === AcquireTokenForManagedIdentityParameters ===
ForceRefresh: False
Resource: https://management.core.windows.net/
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:52Z - fd85dc97-0fb0-4d51-a1d4-70c04de30a11] 
=== Request Data ===
Authority Provided? - True
Scopes - https://management.core.windows.net/
Extra Query Params Keys (space separated) - 
ApiId - AcquireTokenForSystemAssignedManagedIdentity
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - fd85dc97-0fb0-4d51-a1d4-70c04de30a11
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:52Z - fd85dc97-0fb0-4d51-a1d4-70c04de30a11] === Token Acquisition (ManagedIdentityAuthRequest) started:
	 Scopes: https://management.core.windows.net/
	Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:52Z - fd85dc97-0fb0-4d51-a1d4-70c04de30a11] [Internal cache] Total number of cache partitions found while getting access tokens: 1
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:52Z - fd85dc97-0fb0-4d51-a1d4-70c04de30a11] [FindAccessTokenAsync] Discovered 1 access tokens in cache using partition key: system_assigned_managed_identity_managed_identity_AppTokenCache
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:52Z - fd85dc97-0fb0-4d51-a1d4-70c04de30a11] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:52Z - fd85dc97-0fb0-4d51-a1d4-70c04de30a11] Skipping Instance discovery for Aad authority because it is not enabled.
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:52Z - fd85dc97-0fb0-4d51-a1d4-70c04de30a11] Access token is not expired. Returning the found cache entry. [Current time (07/08/2025 17:23:52) - Expiration Time (07/08/2025 18:21:22 +00:00) - Extended Expiration Time (07/08/2025 17:18:43 +00:00)]
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:52Z - fd85dc97-0fb0-4d51-a1d4-70c04de30a11] [ManagedIdentityRequest] Access token retrieved from cache.
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:52Z - fd85dc97-0fb0-4d51-a1d4-70c04de30a11] 
	=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:52Z - fd85dc97-0fb0-4d51-a1d4-70c04de30a11]  AT expiration time: 7/8/2025 6:21:22 PM +00:00, scopes: https://management.core.windows.net/. source: Cache
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:52Z - fd85dc97-0fb0-4d51-a1d4-70c04de30a11] 
[LogMetricsFromAuthResult] Cache Refresh Reason: NotApplicable
[LogMetricsFromAuthResult] DurationInCacheInMs: 0
[LogMetricsFromAuthResult] DurationTotalInMs: 0
[LogMetricsFromAuthResult] DurationInHttpInMs: 0
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:52Z - fd85dc97-0fb0-4d51-a1d4-70c04de30a11] TokenEndpoint: ****
DEBUG: ManagedIdentityCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net/ ] ParentRequestId:  ExpiresOn: 2025-07-08T18:21:22.5642970+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: '33e01921-4d64-4f8c-a055-5bdaffd5e33d', UserId: 'MSI@50342'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.azure.com/subscriptions/0a6b0715-421d-4cc2-8259-7e7761b45e79/resourceGroups/ljernigan-testing/providers/Microsoft.BareMetal/BareMetalConnections/june-26-test-1?api-version=2023-12-01

Headers:
User-Agent                    : AzurePowershell/v14.1.0,cloud-shell_1.0,Az.Resources/8.0.0,PSVersion/v7.5.1,ps-cloud-shell/0.1.0
ParameterSetName              : ByResourceId
CommandName                   : New-AzResource

Body:
{
  "properties": {
    "ipaddress": "10.0.10.44",
    "deviceid": "8be8b3e0-a3ff-4ae0-a443-dcc37cc68e2a",
    "subnetresourceid": "/subscriptions/0a6b0715-421d-4cc2-8259-7e7761b45e79/resourceGroups/ljernigan-testing/providers/Microsoft.Network/virtualNetworks/ljernigan-policy-test-vnet/subnets/oracle"
  },
  "location": "eastus2euap"
}
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
ETag                          : W/"datetime'2025-07-08T17%3A23%3A53.404864Z'"
Vary                          : Accept-Encoding
Access-Control-Expose-Headers : Request-Context
x-ms-operation-identifier     : tenantId=33e01921-4d64-4f8c-a055-5bdaffd5e33d,objectId=599f964a-8b75-47f4-b9b6-01267eff11aa/westus/85a54ee1-774e-4eb8-9eb7-5289c2657ce5
x-ms-request-id               : 5e2753e1-2d32-444f-a538-d2a975232f48
Azure-AsyncOperation          : https://management.azure.com/subscriptions/0a6b0715-421d-4cc2-8259-7e7761b45e79/providers/Microsoft.BareMetal/locations/eastus2euap/operationResults/5e2753e1-2d32-444f-a538-d2a975232f48?api-version=2018-09-01-preview&t=638875922348796972&c=MIIHhzCCBm-gAwIBAgITfAd-Vd7NbNf6pu3--QAAB35V3jANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwNDE4MDkzMjM0WhcNMjUxMDE1MDkzMjM0WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM4cOuemCoMuyhG-hRDGM5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037pB0zm4jf5VyKIPEWSyJaNLm64-SZI6ZAsvrtmQ1jux1dCP_nTlPS4YBZdy_lRYjRe_8cQLxM&s=VL25qRnxdXkKkmnWuqNe3q_--kfZzBwZUuiVCbinTJPO0PvOxmTr7GokfFQ6tFKfWRUhcvosTxp0gmK5yoPXE_f2aXMSB8wTEbF3_lsI6XeEjxOnjobH2FaOl8xiJSWTDco7CWesfyWobFykTkDQiZMALLKVmgOh1y6nWMnpLFzx_7VgxM28ZY7X_hjwMUCEpx8sgNsPiixBZz30IDzW6K5aXBRbSCzFnHhDquskTMqtVe_LR1CxeqII0KRskxKyaGCYoGEVbzuEvXPOtcXsadPFwMY8bpAmu894BeTsoIKDCOQOF8fiLtg-ZrubdOfDGMcqmsLPff35KngNrHVehA&h=Eu31Q1gVEQWVtX69cxQ_bC2727g68lCILj5OGhIVXBc
Request-Context               : appId=cid-v1:bfdc654d-0a21-44ea-a5e9-b708d02ab97e
X-AspNet-Version              : 4.0.30319
X-Powered-By                  : ASP.NET
x-ms-ratelimit-remaining-subscription-resource-requests: 799
x-ms-correlation-request-id   : 7d383337-bf0e-40db-be91-692edfe31cfd
x-ms-routing-request-id       : WESTUS:20250708T172354Z:7d383337-bf0e-40db-be91-692edfe31cfd
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
X-Cache                       : CONFIG_NOCACHE
X-MSEdge-Ref                  : Ref A: BE57ECDF9D2448E781E982E711A67F26 Ref B: SJC211051201037 Ref C: 2025-07-08T17:23:52Z
Date                          : Tue, 08 Jul 2025 17:23:54 GMT

Body:
{
  "id": "/subscriptions/0a6b0715-421d-4cc2-8259-7e7761b45e79/resourceGroups/ljernigan-testing/providers/Microsoft.BareMetal/bareMetalConnections/june-26-test-1",
  "name": "june-26-test-1",
  "type": "Microsoft.BareMetal/bareMetalConnections",
  "etag": "W/\"datetime'2025-07-08T17%3A23%3A53.404864Z'\"",
  "location": "eastus2euap",
  "properties": {
    "subnetresourceid": "/subscriptions/0a6b0715-421d-4cc2-8259-7e7761b45e79/resourceGroups/ljernigan-testing/providers/Microsoft.Network/virtualNetworks/ljernigan-policy-test-vnet/subnets/oracle",
    "ipaddress": "10.0.10.44",
    "deviceid": "8be8b3e0-a3ff-4ae0-a443-dcc37cc68e2a",
    "provisioningState": "Accepted"
  }
}
DEBUG: [Common.Authentication]: Authenticating using Account: 'MSI@50342', environment: 'AzureCloud', tenant: '33e01921-4d64-4f8c-a055-5bdaffd5e33d'
DEBUG: 5:23:54 PM - [ConfigManager] Got nothing from [DisableInstanceDiscovery], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 5:23:54 PM - [ManagedServiceIdentityAuthenticator] Calling ManagedIdentityCredential.GetTokenAsync - TenantId:'33e01921-4d64-4f8c-a055-5bdaffd5e33d', Scopes:'https://management.core.windows.net/', UserId:''
DEBUG: ManagedIdentityCredential.GetToken invoked. Scopes: [ https://management.core.windows.net/ ] ParentRequestId:
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:54Z - fce70c0c-346a-4489-817e-765f415feb3e] MSAL MSAL.CoreCLR with assembly version '4.65.0.0'. CorrelationId(fce70c0c-346a-4489-817e-765f415feb3e)
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:54Z - fce70c0c-346a-4489-817e-765f415feb3e] === AcquireTokenForManagedIdentityParameters ===
ForceRefresh: False
Resource: https://management.core.windows.net/
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:54Z - fce70c0c-346a-4489-817e-765f415feb3e] 
=== Request Data ===
Authority Provided? - True
Scopes - https://management.core.windows.net/
Extra Query Params Keys (space separated) - 
ApiId - AcquireTokenForSystemAssignedManagedIdentity
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - fce70c0c-346a-4489-817e-765f415feb3e
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:54Z - fce70c0c-346a-4489-817e-765f415feb3e] === Token Acquisition (ManagedIdentityAuthRequest) started:
	 Scopes: https://management.core.windows.net/
	Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:54Z - fce70c0c-346a-4489-817e-765f415feb3e] [Internal cache] Total number of cache partitions found while getting access tokens: 1
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:54Z - fce70c0c-346a-4489-817e-765f415feb3e] [FindAccessTokenAsync] Discovered 1 access tokens in cache using partition key: system_assigned_managed_identity_managed_identity_AppTokenCache
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:54Z - fce70c0c-346a-4489-817e-765f415feb3e] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:54Z - fce70c0c-346a-4489-817e-765f415feb3e] Skipping Instance discovery for Aad authority because it is not enabled.
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:54Z - fce70c0c-346a-4489-817e-765f415feb3e] Access token is not expired. Returning the found cache entry. [Current time (07/08/2025 17:23:54) - Expiration Time (07/08/2025 18:21:22 +00:00) - Extended Expiration Time (07/08/2025 17:18:43 +00:00)]
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:54Z - fce70c0c-346a-4489-817e-765f415feb3e] [ManagedIdentityRequest] Access token retrieved from cache.
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:54Z - fce70c0c-346a-4489-817e-765f415feb3e] 
	=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:54Z - fce70c0c-346a-4489-817e-765f415feb3e]  AT expiration time: 7/8/2025 6:21:22 PM +00:00, scopes: https://management.core.windows.net/. source: Cache
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:54Z - fce70c0c-346a-4489-817e-765f415feb3e] 
[LogMetricsFromAuthResult] Cache Refresh Reason: NotApplicable
[LogMetricsFromAuthResult] DurationInCacheInMs: 0
[LogMetricsFromAuthResult] DurationTotalInMs: 0
[LogMetricsFromAuthResult] DurationInHttpInMs: 0
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:54Z - fce70c0c-346a-4489-817e-765f415feb3e] TokenEndpoint: ****
DEBUG: ManagedIdentityCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net/ ] ParentRequestId:  ExpiresOn: 2025-07-08T18:21:22.5642970+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: '33e01921-4d64-4f8c-a055-5bdaffd5e33d', UserId: 'MSI@50342'
DEBUG: [Common.Authentication]: Authenticating using Account: 'MSI@50342', environment: 'AzureCloud', tenant: '33e01921-4d64-4f8c-a055-5bdaffd5e33d'
DEBUG: 5:23:55 PM - [ConfigManager] Got nothing from [DisableInstanceDiscovery], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 5:23:55 PM - [ManagedServiceIdentityAuthenticator] Calling ManagedIdentityCredential.GetTokenAsync - TenantId:'33e01921-4d64-4f8c-a055-5bdaffd5e33d', Scopes:'https://management.core.windows.net/', UserId:''
DEBUG: ManagedIdentityCredential.GetToken invoked. Scopes: [ https://management.core.windows.net/ ] ParentRequestId:
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:55Z - 17eca19a-ba50-4a80-818f-0a98f0af4ab2] MSAL MSAL.CoreCLR with assembly version '4.65.0.0'. CorrelationId(17eca19a-ba50-4a80-818f-0a98f0af4ab2)
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:55Z - 17eca19a-ba50-4a80-818f-0a98f0af4ab2] === AcquireTokenForManagedIdentityParameters ===
ForceRefresh: False
Resource: https://management.core.windows.net/
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:55Z - 17eca19a-ba50-4a80-818f-0a98f0af4ab2] 
=== Request Data ===
Authority Provided? - True
Scopes - https://management.core.windows.net/
Extra Query Params Keys (space separated) - 
ApiId - AcquireTokenForSystemAssignedManagedIdentity
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - 17eca19a-ba50-4a80-818f-0a98f0af4ab2
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:55Z - 17eca19a-ba50-4a80-818f-0a98f0af4ab2] === Token Acquisition (ManagedIdentityAuthRequest) started:
	 Scopes: https://management.core.windows.net/
	Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:55Z - 17eca19a-ba50-4a80-818f-0a98f0af4ab2] [Internal cache] Total number of cache partitions found while getting access tokens: 1
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:55Z - 17eca19a-ba50-4a80-818f-0a98f0af4ab2] [FindAccessTokenAsync] Discovered 1 access tokens in cache using partition key: system_assigned_managed_identity_managed_identity_AppTokenCache
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:55Z - 17eca19a-ba50-4a80-818f-0a98f0af4ab2] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:55Z - 17eca19a-ba50-4a80-818f-0a98f0af4ab2] Skipping Instance discovery for Aad authority because it is not enabled.
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:55Z - 17eca19a-ba50-4a80-818f-0a98f0af4ab2] Access token is not expired. Returning the found cache entry. [Current time (07/08/2025 17:23:55) - Expiration Time (07/08/2025 18:21:22 +00:00) - Extended Expiration Time (07/08/2025 17:18:43 +00:00)]
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:55Z - 17eca19a-ba50-4a80-818f-0a98f0af4ab2] [ManagedIdentityRequest] Access token retrieved from cache.
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:55Z - 17eca19a-ba50-4a80-818f-0a98f0af4ab2] 
	=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:55Z - 17eca19a-ba50-4a80-818f-0a98f0af4ab2]  AT expiration time: 7/8/2025 6:21:22 PM +00:00, scopes: https://management.core.windows.net/. source: Cache
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:55Z - 17eca19a-ba50-4a80-818f-0a98f0af4ab2] 
[LogMetricsFromAuthResult] Cache Refresh Reason: NotApplicable
[LogMetricsFromAuthResult] DurationInCacheInMs: 0
[LogMetricsFromAuthResult] DurationTotalInMs: 0
[LogMetricsFromAuthResult] DurationInHttpInMs: 0
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:23:55Z - 17eca19a-ba50-4a80-818f-0a98f0af4ab2] TokenEndpoint: ****
DEBUG: ManagedIdentityCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net/ ] ParentRequestId:  ExpiresOn: 2025-07-08T18:21:22.5642970+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: '33e01921-4d64-4f8c-a055-5bdaffd5e33d', UserId: 'MSI@50342'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/0a6b0715-421d-4cc2-8259-7e7761b45e79/providers/Microsoft.BareMetal/locations/eastus2euap/operationResults/5e2753e1-2d32-444f-a538-d2a975232f48?api-version=2018-09-01-preview&t=638875922348796972&c=MIIHhzCCBm-gAwIBAgITfAd-Vd7NbNf6pu3--QAAB35V3jANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwNDE4MDkzMjM0WhcNMjUxMDE1MDkzMjM0WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM4cOuemCoMuyhG-hRDGM5d3nryaXbAhDxKILmrQBSq9a63DN4sTbUHZafxKMxwqx_VcG1sqw5HvH-ddECtfe9gbDmbnQAVAUuFSpXo21kRsSsQXQnuX6FFB7s8SIV1uc2zU583Uv_pNTuYIfJFZVMvVua9bd7gtxjzvx7-2dp5tD2zL7TylVdkfZiPWTtOkx7xUwLdk3mjX0IQ1eRW8kPowHclVp0IyKGUEC4jjYVhgVcd2wheCcTwVTmcwVYVzk7WidEXyNszKaJz8DvZgi68_ynv1zePlFZVR_luI4_6niFY_1LEzwz-YcaPKBiOsmqE215FRrHra7d6t1qexoYUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvd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5OGhIVXBc

Headers:
User-Agent                    : AzurePowershell/v14.1.0,cloud-shell_1.0,Az.Resources/8.0.0,PSVersion/v7.5.1,ps-cloud-shell/0.1.0
ParameterSetName              : ByResourceId
CommandName                   : New-AzResource

Body:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
Vary                          : Accept-Encoding
Access-Control-Expose-Headers : Request-Context
x-ms-operation-identifier     : tenantId=33e01921-4d64-4f8c-a055-5bdaffd5e33d,objectId=599f964a-8b75-47f4-b9b6-01267eff11aa/westus/2722669a-7d3a-46e1-9c7e-de6b1dec14c0
x-ms-request-id               : a5351c07-bed4-4173-88bf-8187fca364c7
Request-Context               : appId=cid-v1:bfdc654d-0a21-44ea-a5e9-b708d02ab97e
X-AspNet-Version              : 4.0.30319
X-Powered-By                  : ASP.NET
x-ms-ratelimit-remaining-subscription-reads: 1099
x-ms-ratelimit-remaining-subscription-global-reads: 16499
x-ms-correlation-request-id   : 69527ff5-883d-4dac-b369-636dfd8a7b31
x-ms-routing-request-id       : WESTUS:20250708T172356Z:69527ff5-883d-4dac-b369-636dfd8a7b31
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
X-Cache                       : CONFIG_NOCACHE
X-MSEdge-Ref                  : Ref A: E1DD17BE874F4E968E97EA4DB15831D6 Ref B: BY1AA1072317042 Ref C: 2025-07-08T17:23:55Z
Date                          : Tue, 08 Jul 2025 17:23:56 GMT

Body:
{
  "id": "/subscriptions/0a6b0715-421d-4cc2-8259-7e7761b45e79/providers/Microsoft.BareMetal/locations/eastus2euap/operationResults/5e2753e1-2d32-444f-a538-d2a975232f48",
  "name": "5e2753e1-2d32-444f-a538-d2a975232f48",
  "status": "Creating",
  "startTime": "2025-07-08T17:23:54.7589269Z",
  "endTime": "0001-01-01T00:00:00Z",
  "percentComplete": 0.0
}
DEBUG: [Common.Authentication]: Authenticating using Account: 'MSI@50342', environment: 'AzureCloud', tenant: '33e01921-4d64-4f8c-a055-5bdaffd5e33d'
DEBUG: 5:24:02 PM - [ConfigManager] Got nothing from [DisableInstanceDiscovery], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 5:24:02 PM - [ManagedServiceIdentityAuthenticator] Calling ManagedIdentityCredential.GetTokenAsync - TenantId:'33e01921-4d64-4f8c-a055-5bdaffd5e33d', Scopes:'https://management.core.windows.net/', UserId:''
DEBUG: ManagedIdentityCredential.GetToken invoked. Scopes: [ https://management.core.windows.net/ ] ParentRequestId:
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:24:02Z - a024ec92-3d27-45b8-ad17-e04be35b2082] MSAL MSAL.CoreCLR with assembly version '4.65.0.0'. CorrelationId(a024ec92-3d27-45b8-ad17-e04be35b2082)
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:24:02Z - a024ec92-3d27-45b8-ad17-e04be35b2082] === AcquireTokenForManagedIdentityParameters ===
ForceRefresh: False
Resource: https://management.core.windows.net/
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:24:02Z - a024ec92-3d27-45b8-ad17-e04be35b2082] 
=== Request Data ===
Authority Provided? - True
Scopes - https://management.core.windows.net/
Extra Query Params Keys (space separated) - 
ApiId - AcquireTokenForSystemAssignedManagedIdentity
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - a024ec92-3d27-45b8-ad17-e04be35b2082
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:24:02Z - a024ec92-3d27-45b8-ad17-e04be35b2082] === Token Acquisition (ManagedIdentityAuthRequest) started:
	 Scopes: https://management.core.windows.net/
	Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:24:02Z - a024ec92-3d27-45b8-ad17-e04be35b2082] [Internal cache] Total number of cache partitions found while getting access tokens: 1
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:24:02Z - a024ec92-3d27-45b8-ad17-e04be35b2082] [FindAccessTokenAsync] Discovered 1 access tokens in cache using partition key: system_assigned_managed_identity_managed_identity_AppTokenCache
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:24:02Z - a024ec92-3d27-45b8-ad17-e04be35b2082] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:24:02Z - a024ec92-3d27-45b8-ad17-e04be35b2082] Skipping Instance discovery for Aad authority because it is not enabled.
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:24:02Z - a024ec92-3d27-45b8-ad17-e04be35b2082] Access token is not expired. Returning the found cache entry. [Current time (07/08/2025 17:24:02) - Expiration Time (07/08/2025 18:21:22 +00:00) - Extended Expiration Time (07/08/2025 17:18:43 +00:00)]
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:24:02Z - a024ec92-3d27-45b8-ad17-e04be35b2082] [ManagedIdentityRequest] Access token retrieved from cache.
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:24:02Z - a024ec92-3d27-45b8-ad17-e04be35b2082] 
	=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:24:02Z - a024ec92-3d27-45b8-ad17-e04be35b2082]  AT expiration time: 7/8/2025 6:21:22 PM +00:00, scopes: https://management.core.windows.net/. source: Cache
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:24:02Z - a024ec92-3d27-45b8-ad17-e04be35b2082] 
[LogMetricsFromAuthResult] Cache Refresh Reason: NotApplicable
[LogMetricsFromAuthResult] DurationInCacheInMs: 0
[LogMetricsFromAuthResult] DurationTotalInMs: 0
[LogMetricsFromAuthResult] DurationInHttpInMs: 0
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.5 Linux [2025-07-08 17:24:02Z - a024ec92-3d27-45b8-ad17-e04be35b2082] TokenEndpoint: ****
DEBUG: ManagedIdentityCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net/ ] ParentRequestId:  ExpiresOn: 2025-07-08T18:21:22.5642970+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: '33e01921-4d64-4f8c-a055-5bdaffd5e33d', UserId: 'MSI@50342'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/0a6b0715-421d-4cc2-8259-7e7761b45e79/resourceGroups/ljernigan-testing/providers/Microsoft.BareMetal/BareMetalConnections/june-26-test-1?api-version=2023-12-01

Headers:
User-Agent                    : AzurePowershell/v14.1.0,cloud-shell_1.0,Az.Resources/8.0.0,PSVersion/v7.5.1,ps-cloud-shell/0.1.0
ParameterSetName              : ByResourceId
CommandName                   : New-AzResource

Body:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
ETag                          : W/"datetime'2025-07-08T17%3A23%3A56.3371971Z'"
Vary                          : Accept-Encoding
Access-Control-Expose-Headers : Request-Context
x-ms-ratelimit-remaining-subscription-resource-requests: 249
x-ms-request-id               : dd826253-5bdb-45f9-931d-34d7a4e17597
Request-Context               : appId=cid-v1:bfdc654d-0a21-44ea-a5e9-b708d02ab97e
X-AspNet-Version              : 4.0.30319
X-Powered-By                  : ASP.NET
x-ms-correlation-request-id   : e33c9fc6-05fa-42f1-b13f-0d99b2dcfde5
x-ms-routing-request-id       : WESTUS:20250708T172402Z:e33c9fc6-05fa-42f1-b13f-0d99b2dcfde5
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
X-Cache                       : CONFIG_NOCACHE
X-MSEdge-Ref                  : Ref A: 2570B52A937C4862A664DE1454B10A7F Ref B: BY1AA1072318054 Ref C: 2025-07-08T17:24:02Z
Date                          : Tue, 08 Jul 2025 17:24:02 GMT

Body:
{
  "id": "/subscriptions/0a6b0715-421d-4cc2-8259-7e7761b45e79/resourceGroups/ljernigan-testing/providers/Microsoft.BareMetal/bareMetalConnections/june-26-test-1",
  "name": "june-26-test-1",
  "type": "Microsoft.BareMetal/bareMetalConnections",
  "etag": "W/\"datetime'2025-07-08T17%3A23%3A56.3371971Z'\"",
  "location": "eastus2euap",
  "properties": {
    "subnetresourceid": "/subscriptions/0a6b0715-421d-4cc2-8259-7e7761b45e79/resourceGroups/ljernigan-testing/providers/Microsoft.Network/virtualNetworks/ljernigan-policy-test-vnet/subnets/oracle",
    "ipaddress": "10.0.10.44",
    "deviceid": "8be8b3e0-a3ff-4ae0-a443-dcc37cc68e2a",
    "provisioningState": "Failed"
  }
}
DEBUG: 5:24:02 PM - [ResourceManagerCmdletBase.ExecuteCmdlet] Caught unhandled exception: System.InvalidOperationException: The operation failed because resource is in the: 'Failed' state. Please check the logs for more details.
   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components.LongRunningOperationHelper.FailedResult(OperationResult operationResult, String message)
   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components.LongRunningOperationHelper.HandleCreateOrUpdateResponse(OperationResult operationResult)
   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components.LongRunningOperationHelper.HandleOperationResponse(OperationResult operationResult, Uri lastRequestUri)
   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components.LongRunningOperationHelper.WaitOnOperation(OperationResult operationResult)
   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceCmdlet.<>c__DisplayClass32_0.<OnProcessRecord>b__0()
   at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ConfirmAction(Boolean force, String continueMessage, String processMessage, String target, Action action, Func`1 useShouldContinue)
   at Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet.ConfirmAction(Boolean force, String continueMessage, String processMessage, String target, Action action)
   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceCmdlet.OnProcessRecord()
   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet()
DEBUG: 5:24:02 PM - [ConfigManager] Got nothing from [EnableErrorRecordsPersistence], Module = [Az.Resources], Cmdlet = [New-AzResource]. Returning default value [False].
New-AzResource: The operation failed because resource is in the: 'Failed' state. Please check the logs for more details.
New-AzResource: The operation failed because resource is in the: 'Failed' state. Please check the logs for more details.
DEBUG: 5:24:03 PM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [Az.Resources], Cmdlet = [New-AzResource]. Returning default value [True].
DEBUG: 5:24:03 PM - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 5:24:03 PM - [ConfigManager] Got nothing from [CheckForUpgrade], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 5:24:03 PM - No authentication telemetry is found for the current cmdlet with Id 09bfd400-30d3-42a2-8110-da77a7862d9d.
DEBUG: AzureQoSEvent:  Module: Az.Resources:8.0.0; CommandName: New-AzResource; PSVersion: 7.5.1; IsSuccess: False; Duration: 00:00:10.5444220; SanitizeDuration: 00:00:00; Exception: The operation failed because resource is in the: 'Failed' state. Please check the logs for more details.;
DEBUG: 5:24:03 PM - [ConfigManager] Got [True] from [EnableDataCollection], Module = [], Cmdlet = [].
DEBUG: 5:24:03 PM - NewAzureResourceCmdlet end processing.
PS /home/lauren> Stop-Transcript
**********************
PowerShell transcript end
End time: 20250708172410
**********************

Environment data

Cloudshell with Context set to ame subscription
PS /home/lauren> $PSVersiontable

Name                           Value
----                           -----
PSVersion                      7.5.1
PSEdition                      Core
GitCommitId                    7.5.1
OS                             Microsoft Azure Linux 3.0
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

PS /home/lauren> Get-Module Az*

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     5.0.2                 Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script     10.0.1                Az.Compute                          {Add-AzImageDataDisk, Add-AzVhd, Add-AzVMAdditionalUnattendContent, Add-A…
Script     7.17.0                Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificate, Add-AzApplicationGate…
Script     8.0.0                 Az.Resources                        {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get…
Script     9.0.0                 Az.Storage                          {Add-AzRmStorageContainerLegalHold, Add-AzStorageAccountManagementPolicyA…
Script     1.1.3                 Az.Tools.Predictor                  {Disable-AzPredictor, Enable-AzPredictor, Open-AzPredictorSurvey, Send-Az…
Script     0.0.0.10              AzureAD.Standard.Preview            {Add-AzureADApplicationOwner, Add-AzureADDeviceRegisteredOwner, Add-Azure…
Script     0.9.3                 AzurePSDrive

Error output

PS /home/lauren> Resolve-AzError

   HistoryId: 11

Message        : The operation failed because resource is in the: 'Failed' state. Please check the logs for more details.
StackTrace     :    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.HandleException(ExceptionDispa
                 tchInfo capturedException)
                    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet()
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__3`1.<ExecuteSynchronouslyOrAsJob>b__3_0(T c)
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet, Action`1 
                 executor)
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet)
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception      : System.InvalidOperationException
InvocationInfo : {New-AzResource}
Line           : new-azresource -Location eastus2euap -Properties $prop -resourceId "/subscriptions/0a6b0715-421d-4cc2-8259-7e7761b45e79/resour
                 ceGroups/ljernigan-testing/providers/Microsoft.BareMetal/BareMetalConnections/june-26-test-1" -Debug
Position       : At line:1 char:1
                 + new-azresource -Location eastus2euap -Properties $prop -resourceId "/ …
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 11


   HistoryId: 9

Message        : File /home/lauren/out.txt already exists and NoClobber was specified.
StackTrace     :    at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
Exception      : System.UnauthorizedAccessException
InvocationInfo : {Start-Transcript}
Line           : Start-Transcript -Path ./out.txt -NoClobber
Position       : At line:1 char:1
                 + Start-Transcript -Path ./out.txt -NoClobber
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 9


   HistoryId: 4

Message        : The operation failed because resource is in the: 'Failed' state. Please check the logs for more details.
StackTrace     :    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.HandleException(ExceptionDispa
                 tchInfo capturedException)
                    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet()
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__3`1.<ExecuteSynchronouslyOrAsJob>b__3_0(T c)
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet, Action`1 
                 executor)
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet)
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception      : System.InvalidOperationException
InvocationInfo : {New-AzResource}
Line           : new-azresource -Location eastus2euap -Properties $prop -resourceId "/subscriptions/0a6b0715-421d-4cc2-8259-7e7761b45e79/resour
                 ceGroups/ljernigan-testing/providers/Microsoft.BareMetal/BareMetalConnections/june-26-test-1" -Debug | Out-File -FilePath 
                 "./out.txt" -Append
Position       : At line:1 char:1
                 + new-azresource -Location eastus2euap -Properties $prop -resourceId "/+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 4

Metadata

Metadata

Assignees

No one assigned

    Labels

    TrackingWe will track status and follow internallyquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions