breezy-fountain-66951
05/29/2024, 7:36 AMlively-crayon-44649
05/29/2024, 8:49 AMhost_pool.registration_info.token
and it's coming back as None
? Or is the entier registration_info
object itself None
?breezy-fountain-66951
05/29/2024, 9:50 AMlively-crayon-44649
05/29/2024, 10:13 AMbreezy-fountain-66951
05/29/2024, 10:33 AMlively-crayon-44649
05/29/2024, 10:38 AMhost_pool.system_data.apply(lambda x: print(x))
or the like?breezy-fountain-66951
05/29/2024, 11:25 AMNone
value. Strange thing is that this https request also returns None
.
url = f"<https://management.azure.com/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.DesktopVirtualization/hostPools/{host_pool_name}/retrieveRegistrationToken?api-version=2022-02-10-preview>"
response = requests.post(url)
if response.status_code == 200:
registration_info = response.json()
registration_token = registration_info.get("token")
print(f"Registration Token: {registration_token}")
else:
print(f"Error retrieving registration token: {response.text}")
return registration_token
lively-crayon-44649
05/29/2024, 11:26 AM