diff --git a/Slingshot.Api/Controllers/ARMController.cs b/Slingshot.Api/Controllers/ARMController.cs index f1ce028..74f43d5 100644 --- a/Slingshot.Api/Controllers/ARMController.cs +++ b/Slingshot.Api/Controllers/ARMController.cs @@ -430,7 +430,8 @@ private async Task GetTenantsArray() return null; } - var tenants = await response.Content.ReadAsAsync(); + var tenantsString = await response.Content.ReadAsStringAsync(); + var tenants = JArray.Parse(tenantsString); tenants = SetCurrentTenant(tenants); return tenants; } @@ -445,7 +446,8 @@ private async Task GetTenantsArray() return null; } - var tenants = (JArray)(await response.Content.ReadAsAsync())["value"]; + var tenantsString = await response.Content.ReadAsStringAsync(); + var tenants = (JArray)(JObject.Parse(tenantsString))["value"]; tenants = SetCurrentTenant(ToTenantDetails(tenants)); return tenants; }