diff --git a/pan_cortex_data_lake/credentials.py b/pan_cortex_data_lake/credentials.py index eb6ae67..61782b7 100644 --- a/pan_cortex_data_lake/credentials.py +++ b/pan_cortex_data_lake/credentials.py @@ -477,7 +477,9 @@ def refresh(self, access_token=None, **kwargs): if not self.token_lock.locked(): with self.token_lock: if access_token == self.access_token or access_token is None: - if self.developer_token is not None: + if self.developer_token is not None and not any( + [self.access_token_, os.getenv("PAN_ACCESS_TOKEN")] + ): parsed_provider = urlparse(self.developer_token_provider) url = "{}://{}".format( parsed_provider.scheme, parsed_provider.netloc