def get_token(self):
        """Gets an access token to access office service.
        Args:
            tenant_id (str): the tenant id
            client_id (str): the client id
            client_secret (str): the secret id for the client
        Returns:
            A token access key.
        """
        logging.info("Getting token for tenant: {0}".format(self.msal_tenant_id))
        try:
            context = msal.ConfidentialClientApplication(self.msal_client_id,
                                                        authority='https://login.microsofto'
                                                                'nline.com/' + self.msal_tenant_id,
                                                        client_credential=self.msal_client_secret)
            token, token_ttl = self.acquire_token(context)
            # Set expiry of MSAL token to 55 minutes to avoid token expiry during upload
            msal_token_expiry = datetime.datetime.now() + datetime.timedelta(seconds=token_ttl - 300)
            return token, msal_token_expiry
        except requests.exceptions.RequestException as e:
            logging.info("Error getting token for tenant: {0}".format(self.msal_tenant_id))
            raise e
Gets an access token to access office service.
        Args:
            tenant_id (str): the tenant id
            client_id (str): the client id
            client_secret (str): the secret id for the client
        Returns:
            A token access key.
        
Solutions/GreyNoiseThreatIntelligence/Data Connectors/GreyNoiseAPISentinelConnector/main.py