Minor: Fix Powerbi refresh token on expire (#18774)

Co-authored-by: Mayur Singal <39544459+ulixius9@users.noreply.github.com>
This commit is contained in:
Suman Maharana 2024-11-25 23:19:30 +05:30 committed by GitHub
parent d6470b7800
commit f40138a56e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,11 +64,10 @@ class PowerBiApiClient:
client_credential=self.config.clientSecret.get_secret_value(), client_credential=self.config.clientSecret.get_secret_value(),
authority=self.config.authorityURI + self.config.tenantId, authority=self.config.authorityURI + self.config.tenantId,
) )
self.auth_token = self.get_auth_token()
client_config = ClientConfig( client_config = ClientConfig(
base_url="https://api.powerbi.com", base_url="https://api.powerbi.com",
api_version="v1.0", api_version="v1.0",
auth_token=lambda: self.auth_token, auth_token=self.get_auth_token,
auth_header="Authorization", auth_header="Authorization",
allow_redirects=True, allow_redirects=True,
retry_codes=[429], retry_codes=[429],