'RecoveryServicesClient Item Paged and Authority Error

credentials = ClientSecretCredential(
                    client_id,
                    client_secret,
                    tenant_id
                )
recoveryservices_client = RecoveryServicesClient(credentials, subscription_id)
list_vaults = recoveryservices_client.vaults.list_by_subscription_id()

list_vars returns <iterator object azure.core.paging.ItemPaged at 0x105377df0>

Iteration over itempaged gives this error:

in raise_from
azure.core.exceptions.ClientAuthenticationError: Authentication failed: Unable to get authority configuration for https://login.microsoftonline.com/xx-xx-xxx. Authority would typically be in a format of https://login.microsoftonline.com/your_tenant Also please double check your tenant name or GUID is correct.

Operations with api and the same service principal gives the list without error.

Any advice would be appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source