[BUG] Value cannot be null. (Parameter 'resourceId') when calling Arm.GetWebSiteResource(website).GetAllHybridConnectionDataAsync(); #43813
Labels
App Services
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
issue-addressed
Workflow: The Azure SDK team believes it to be addressed and ready to close.
Mgmt
This issue is related to a management-plane library.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Library name and version
Azure.ResourceManager.AppService 1.1.0-beta.5
Describe the bug
This seems similar to #34745
Seems to get the response back but can't deserialize the response.
`
[Informational] Azure-Identity: ClientSecretCredential.GetToken invoked. Scopes: [ https://management.azure.com//.default ] ParentRequestId: 2b6a2ffb-8559-4a45-a280-a6c3c897778d
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:28:59Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6] MSAL MSAL.NetCore with assembly version '4.56.0.0'. CorrelationId(4b9ad602-b090-46ba-85f6-e5697ccdf0c6)
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:28:59Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6] === AcquireTokenForClientParameters ===
SendX5C: False
ForceRefresh: False
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:28:59Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.azure.com//.default
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenForClient
IsConfidentialClient - True
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:28:59Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6] === Token Acquisition (ClientCredentialRequest) started:
Scopes: https://management.azure.com//.default
Authority Host: login.microsoftonline.com
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:28:59Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6] [Instance Discovery] Instance discovery is enabled and will be performed
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:28:59Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6] [Region discovery] Not using a regional authority.
[Informational] Azure-Core: Request [f96be01d-4156-4279-8f27-051778cd7313] POST https://login.microsoftonline.com/db8e2ba9-95c1-4fbb-b558-6bf8bb1d2981/oauth2/v2.0/token
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-CPU:REDACTED
x-client-OS:REDACTED
x-client-current-telemetry:REDACTED
x-client-last-telemetry:REDACTED
x-ms-lib-capability:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
x-app-name:REDACTED
x-app-ver:REDACTED
Content-Type:application/x-www-form-urlencoded
x-ms-client-request-id:f96be01d-4156-4279-8f27-051778cd7313
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity/1.10.4 (.NET 7.0.14; Microsoft Windows 10.0.22621)
client assembly: Azure.Identity
[Informational] Azure-Core: Response [f96be01d-4156-4279-8f27-051778cd7313] 200 OK (00.6s)
Cache-Control:no-store, no-cache
Pragma:no-cache
Strict-Transport-Security:REDACTED
X-Content-Type-Options:REDACTED
P3P:REDACTED
client-request-id:REDACTED
x-ms-request-id:a006ed51-3f28-48d3-99f5-a23ea9346700
x-ms-ests-server:REDACTED
x-ms-clitelem:REDACTED
x-ms-srs:REDACTED
X-XSS-Protection:REDACTED
Set-Cookie:REDACTED
Date:Wed, 01 May 2024 23:28:59 GMT
Content-Type:application/json; charset=utf-8
Expires:-1
Content-Length:1369
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:29:00Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6] ScopeSet was missing from the token response, so using developer provided scopes in the result.
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:29:00Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6] Checking client info returned from the server..
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:29:00Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6] Saving token response to cache..
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:29:00Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6] [SaveTokenResponseAsync] ID Token not present in response.
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:29:00Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6] Cannot determine home account id - or id token or no client info and no subject
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:29:00Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6] [SaveTokenResponseAsync] Saving AT in cache and removing overlapping ATs...
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:29:00Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6] Looking for scopes for the authority in the cache which intersect with https://management.azure.com//.default
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:29:00Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6] Intersecting scope entries count - 0
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:29:00Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6]
=== Token Acquisition finished successfully:
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:29:00Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6] AT expiration time: 5/2/2024 12:28:59 AM +00:00, scopes: https://management.azure.com//.default. source: IdentityProvider
[Informational] Azure-Identity: False MSAL 4.56.0.0 MSAL.NetCore .NET 7.0.14 Microsoft Windows 10.0.22621 [2024-05-01 23:29:00Z - 4b9ad602-b090-46ba-85f6-e5697ccdf0c6] Fetched access token from host login.microsoftonline.com.
[Informational] Azure-Identity: ClientSecretCredential.GetToken succeeded. Scopes: [ https://management.azure.com//.default ] ParentRequestId: 2b6a2ffb-8559-4a45-a280-a6c3c897778d ExpiresOn: 2024-05-02T00:28:59.3951101+00:00
[Informational] Azure-Core: Request [2b6a2ffb-8559-4a45-a280-a6c3c897778d] GET https://management.azure.com/subscriptions/XXXXX/resourceGroups/Proxies/providers/Microsoft.Web/sites/sitename/hybridConnectionRelays?api-version=2021-02-01
Accept:application/json
x-ms-client-request-id:2b6a2ffb-8559-4a45-a280-a6c3c897778d
x-ms-return-client-request-id:true
User-Agent:azsdk-net-ResourceManager.AppService/1.1.0-beta.5 (.NET 7.0.14; Microsoft Windows 10.0.22621)
Authorization:REDACTED
client assembly: Azure.ResourceManager
[Informational] Azure-Core: Response [2b6a2ffb-8559-4a45-a280-a6c3c897778d] 200 OK (00.3s)
Cache-Control:no-cache
Pragma:no-cache
Strict-Transport-Security:REDACTED
x-ms-request-id:f268e279-723f-4994-97b9-b548f553780f
X-AspNet-Version:REDACTED
X-Powered-By:REDACTED
x-ms-ratelimit-remaining-subscription-reads:REDACTED
x-ms-correlation-request-id:REDACTED
x-ms-routing-request-id:REDACTED
X-Content-Type-Options:REDACTED
X-Cache:REDACTED
X-MSEdge-Ref:REDACTED
Date:Wed, 01 May 2024 23:29:00 GMT
Content-Length:4439
Content-Type:application/json
Expires:-1
[Verbose] Azure-Core: Response [2b6a2ffb-8559-4a45-a280-a6c3c897778d] content:
"value": [
{
"id": "/subscriptions/XXX/resourceGroups/Proxies/providers/Microsoft.Web/sites/name/hybridConnectionNamespaces/namespace/relays/name1",
"name": "name1",
"type": "Microsoft.Web/sites/hybridConnectionNamespaces/relays",
"location": "West US 2",
"properties": {
"serviceBusNamespace": "relayName",
"relayName": "name1",
"relayArmUri": "/subscriptions/XXX/resourceGroups/TechSupport/providers/Microsoft.Relay/namespaces/relayName/hybridConnections/lhtest3",
"hostname": "test.test.com",
"port": 443,
"sendKeyName": "defaultSender",
"sendKeyValue": "",
"serviceBusSuffix": ".servicebus.windows.net"
}
},
{
"id": "/subscriptions/XXX/resourceGroups/Proxies/providers/Microsoft.Web/sites/name/hybridConnectionNamespaces/namespace/relays/name2",
"name": "name2",
"type": "Microsoft.Web/sites/hybridConnectionNamespaces/relays",
"location": "West US 2",
"properties": {
"serviceBusNamespace": "relayName",
"relayName": "name2",
"relayArmUri": "/subscriptions/XXXX/resourceGroups/TechSupport/providers/Microsoft.Relay/namespaces/relayName/hybridConnections/name2",
"hostname": "test.test.com",
"port": 443,
"sendKeyName": "defaultSender",
"sendKeyValue": "",
"serviceBusSuffix": ".servicebus.windows.net"
}
}
],
"nextLink": null,
"id": null
`
Expected behavior
Would expect it to return without error
Actual behavior
Value cannot be null. (Parameter 'resourceId')
at Azure.Core.Argument.AssertNotNullOrEmpty(String value, String name)
at Azure.Core.ResourceIdentifier..ctor(String resourceId)
at Azure.ResourceManager.AppService.HybridConnectionData.DeserializeHybridConnectionData(JsonElement element)
at Azure.ResourceManager.AppService.WebAppsRestOperations.ListHybridConnectionsAsync(String subscriptionId, String resourceGroupName, String name, CancellationToken cancellationToken)
at Azure.ResourceManager.AppService.WebSiteResource.GetAllHybridConnectionDataAsync(CancellationToken cancellationToken)
Reproduction Steps
var website = WebSiteResource.CreateResourceIdentifier(_azureSubscriptionId, resourceGroup, proxy); var armClient = new ArmClient(new ClientSecretCredential(AzureTenantId, AzureClientId, AzureClientSecret),null, new ArmClientOptions(){Diagnostics = { IsLoggingContentEnabled = true }}); var hybridConnectionData=await armClient.GetWebSiteResource(website).GetAllHybridConnectionDataAsync();
Environment
linq pad 7 / vs 17.8.2 , win 11
The text was updated successfully, but these errors were encountered: