def create_threat_indicators(self, headers, body):
        """
        Makes a POST request to create a TI indicator.
        :param headers: Header of the POST request.
        :param body: Body of the POST request.
        :returns: json response.
        :raises GraphAPIRequestError: raises an exception
        """
        ti_url = "https://graph.microsoft.com/beta/security/tiIndicators/submitTiIndicators"
        if body is None:
            logging.error("Request body cannot be empty.")
            raise GraphAPIRequestError("Request body cannot be empty.")

        try:
            response = requests.post(
                url=ti_url, data=json.dumps(body, ensure_ascii=False).encode("utf-8"), headers=headers, stream=False
            )
        except ConnectionError:
            raise GraphAPIRequestError("Error on Graph API while creating new indicators.")

        if 200 <= response.status_code <= 299:
            logging.info(str(len(body["value"])) + " Threat Indicators sent successfully!")
        else:
            logging.error("Graph API Connector error occurred!")
            logging.error(response.content)
            raise GraphAPIRequestError("Error on Graph API while creating new indicators.")

        Makes a POST request to create a TI indicator.
        :param headers: Header of the POST request.
        :param body: Body of the POST request.
        :returns: json response.
        :raises GraphAPIRequestError: raises an exception
        
Solutions/MimecastTIRegional/Data Connectors/Helpers/graph_api_collector.py