A cloud-based identity and access management service for securing user authentication and resource access
Hello @Amandeep Patro ,
We are sorry are facing this issue. You're seeing this issue because the Azure AD authority URL for Azure US Government Cloud has been changed from login-us.microsoftonline.com to login.microsoftonline.us. All of the libraries default to using https://login.microsoftonline.com as the Azure Active Directory authority host.
What you need to do is instantiate DefaultAzureCredential with the proper authority host for the cloud you are targeting. Run az cloud list to find the appropriate activeDirectory endpoint. You can set via the AZURE_AUTHORITY_HOST environment variable or use the AzureAuthorityHosts enums.
Please follow the steps in this blog post to resolve the issue. Let us know if you have further questions
Best,
Grace