def check_environment_var_exist(azure_function_name):
    """To verify that all required environment variables are exist.

    Raises:
        CofenseException: raise exception if any of the required environment variable is not set.
    """
    __method_name = inspect.currentframe().f_code.co_name
    env_var = [
        {"CofenseClientId": COFENSE_CLIENT_ID},
        {"CofenseClientSecret": COFENSE_CLIENT_SECRET},
        {"AzureClientId": AZURE_CLIENT_ID},
        {"AzureClientSecret": AZURE_CLIENT_SECRET},
        {"AzureTenantId": AZURE_TENANT_ID},
        {"AzureResourceGroup": AZURE_RESOURCE_GROUP},
        {"AzureWorkspaceName": AZURE_WORKSPACE_NAME},
        {"AzureSubscriptionId": AZURE_SUBSCRIPTION_ID},
        {"ConnectionString": CONNECTION_STRING},
        {"CofenseBaseURL": COFENSE_BASE_URL},
        {"Reports_Table_name": REPORTS_TABLE_NAME},
        {"WorkspaceID": WORKSPACE_ID},
        {"WorkspaceKey": WORKSPACE_KEY},
        {"Schedule": SCHEDULE},
        {"Threat_Level": THREAT_LEVEL},
    ]
    try:
        applogger.debug(
            "{}(method={}) : Checking if all the environment variables exist or not.".format(
                LOGS_STARTS_WITH, __method_name
            )
        )
        # To do: convert i to each.
        for i in env_var:
            key, val = next(iter(i.items()))
            if val is None or not val:
                # To do: append val to list, at last raise exception for all vals.
                raise CofenseException(
                    "{} : {} : {} is not set in the environment please set the environment"
                    " variable and run the app.".format(
                        LOGS_STARTS_WITH, azure_function_name, key
                    )
                )
    except CofenseException as err:
        applogger.error(
            "{} : {} : {} : error occurred while checking environment variables : {}".format(
                LOGS_STARTS_WITH, azure_function_name, __method_name, err
            )
        )
        raise CofenseException()
To verify that all required environment variables are exist.

    Raises:
        CofenseException: raise exception if any of the required environment variable is not set.
    
Solutions/CofenseTriage/Data Connectors/CofenseTriageDataConnector/SharedCode/utils.py