in azure/Kqlmagic/my_aad_helper.py [0:0]
def get_details(self):
details = {
"resource": self._resource,
"authentication_method": self._current_authentication_method,
"authority_uri": self._authority_uri,
"client_id": self._client_id,
"aad_login_url": self._aad_login_url}
if (self._current_authentication_method == AuthenticationMethod.aad_username_password
or self._current_authentication_method == AuthenticationMethod.aad_code_login):
details["username"] = self._username
if self._current_token:
details["resource"] = self._get_token_resource(self._current_token) or self._get_resources_from_token(self._current_token) or details["resource"]
details["authority_uri"] = self._get_token_authority(self._current_token) or self._get_authority_from_token(self._current_token) or details["authority_uri"]
details["client_id"] = self._get_token_client_id(self._current_token) or self._get_client_id_from_token(self._current_token) or details["client_id"]
details["username"] = self._get_token_user_id(self._current_token) or self._get_username_from_token(self._current_token) or details["username"]
if self._current_authentication_method == AuthenticationMethod.azcli_login_subscription:
details["subscription"] = self._options.get("try_azcli_login_subscription")
elif self._current_authentication_method == AuthenticationMethod.azcli_login:
details["tenant"] = self._authority
elif self._current_authentication_method == AuthenticationMethod.azcli_login_by_profile:
details["tenant"] = self._authority
elif self._current_authentication_method == AuthenticationMethod.managed_service_identity:
details["msi_params"] = self._options.get("try_msi")
elif self._current_authentication_method == AuthenticationMethod.aad_application_certificate:
details["thumbprint"] = self._thumbprint
elif self._current_authentication_method == AuthenticationMethod.aad_application_key:
details["client_secret"] = '*****' if self._client_secret else 'NOT-SET'
elif self._current_authentication_method == AuthenticationMethod.aad_username_password:
details["password"] = '*****' if self._password else 'NOT-SET'
return details