-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to authenticate the ModernUsageDetail api #35537
Comments
Thanks for reaching out. In your code, seems like you only create the credential object but do not call get_token method. You can get more details in https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity/azure/identity/_credentials/client_secret.py. |
Hi @Gopichand-Heeddata. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation. |
Hi @Gopichand-Heeddata, since you haven’t asked that we |
I used the SubscriptionClient and ClientSecretCrerdentials to authenticate the azure APIs.
When I want to create the bearer token to modernusage API to get 1-year data, I am not able to generate the bearer token. will you please suggest any procedure to create that token.
I am attaching the implemented code:
@Property
def subscription(self):
if self._subscription:
return self._subscription
self._subscription = SubscriptionClient(
self.service_principal_credentials)
return self._subscription
@Property
def service_principal_credentials(self):
if self._service_principal_credentials:
return self._service_principal_credentials
self._service_principal_credentials = (
self._get_service_principal_credentials())
return self._service_principal_credentials
@shanselman @osake @notlaforge can you please provide me solution.
The text was updated successfully, but these errors were encountered: