def get_bearer_token_from_response(
        self,
        json_response,
    ):
        """Retrieve the bearer token from the JSON response.

        Args:
            self: The object instance.
            json_response: The JSON response containing the access token.

        Returns:
            string: The bearer token extracted from the JSON response.
        """
        __method_name = inspect.currentframe().f_code.co_name
        try:
            if "access_token" not in json_response:
                applogger.error(
                    self.log_format.format(
                        consts.LOGS_STARTS_WITH,
                        __method_name,
                        self.azure_function_name,
                        "Access token not found in sentinel api call",
                    )
                )
                raise InfobloxException()
            else:
                bearer_token = json_response.get("access_token")
                applogger.info(
                    self.log_format.format(
                        consts.LOGS_STARTS_WITH,
                        __method_name,
                        self.azure_function_name,
                        "Microsoft sentinel access token generated successfully.",
                    )
                )
                return bearer_token
        except KeyError as keyerror:
            applogger.error(
                self.log_format.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    self.azure_function_name,
                    "Key error : Error-{}".format(keyerror),
                )
            )
            raise InfobloxException()
        except Exception as error:
            applogger.error(
                self.log_format.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    self.azure_function_name,
                    consts.UNEXPECTED_ERROR_MSG.format(error),
                )
            )
            raise InfobloxException()
Retrieve the bearer token from the JSON response.

        Args:
            self: The object instance.
            json_response: The JSON response containing the access token.

        Returns:
            string: The bearer token extracted from the JSON response.
        
Solutions/Infoblox/Data Connectors/InfobloxCloudDataConnector/SharedCode/utils.py