code: def set_token(self):
          
          super(ServicePrincipalCredentials, self).set_token()
          try:
              token = self._context.acquire_token_with_client_credentials(
                  self.resource,
                  self.id,
                  self.secret
              )
              self.token = self._convert_token(token)
          except adal.AdalError as err:
              raise_with_traceback(AuthenticationError, "", err)
docs: Get token using Client ID/Secret credentials.
  
          :raises: AuthenticationError if credentials invalid, or call fails.