Skip to content

Commit 1947355

Browse files
authored
Merge pull request #224 from AzureAD/add-telemetry-id
Adding telemetry id for acquire_token_by_refresh_token
2 parents 27b72c8 + 61ac5ca commit 1947355

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

msal/application.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def extract_certs(public_cert_content):
8282
class ClientApplication(object):
8383

8484
ACQUIRE_TOKEN_SILENT_ID = "84"
85+
ACQUIRE_TOKEN_BY_REFRESH_TOKEN = "85"
8586
ACQUIRE_TOKEN_BY_USERNAME_PASSWORD_ID = "301"
8687
ACQUIRE_TOKEN_ON_BEHALF_OF_ID = "523"
8788
ACQUIRE_TOKEN_BY_DEVICE_FLOW_ID = "622"
@@ -727,6 +728,11 @@ def acquire_token_by_refresh_token(self, refresh_token, scopes):
727728
return self.client.obtain_token_by_refresh_token(
728729
refresh_token,
729730
scope=decorate_scope(scopes, self.client_id),
731+
headers={
732+
CLIENT_REQUEST_ID: _get_new_correlation_id(),
733+
CLIENT_CURRENT_TELEMETRY: _build_current_telemetry_request_header(
734+
self.ACQUIRE_TOKEN_BY_REFRESH_TOKEN),
735+
},
730736
rt_getter=lambda rt: rt,
731737
on_updating_rt=False,
732738
on_removing_rt=lambda rt_item: None, # No OP

0 commit comments

Comments
 (0)