Welcome to the Microsoft Q&A Forum! Thank you for posting your query here.
The ImportError: cannot import name 'AccessTokenInfo' from 'azure.core.credentials'
occurs because the AccessTokenInfo
class was introduced in version 1.33.0 of the azure-core
library. Since you're using version 1.32.0, this class isn't available, leading to the import error when your script attempts to import SecretClient
from azure.keyvault.secrets
.
To resolve this issue, upgrade your azure-core
library to version 1.33.0 or later. You can do this by running the following command:
pip install --upgrade azure-core
After upgrading, ensure that your script is using the correct version by adding the following lines to your script:
import azure.core
print(azure.core.__version__)
This will print the version of azure-core
being used, allowing you to confirm that the upgrade was successful.
For more, you can refer to the official Microsoft documentation: AccessTokenInfo
I hope this is helpful! Do let me know if you are still the facing the issue.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.