def epmAuth(dispatcher, username, password):
    """
        EPM Authentication
        This method authenticates the user to EPM using username and password and returns
        a token that can be used in subsequent Rest API calls.
        After the configured timeout expires, users have to logon again using their
        username and password.
        The session timeout for all APIs is part of the session token and is defined by the
        Timeoutforinactivesession Server Configuration parameter.
        Args:
            diapatcher (str): The EPM SaaS site to get version information from and perform the initial logon
            username (str): Valid User ID with access to the Set(s)
            password (str): Password for the User ID logging into the Rest API

        Returns:
            list: Json list containing the EPMAuthenticationResult, ManagerURL, IsPasswordExpired (True/False)
    """
    # build the body of the request containing the credentials
    body = {}
    body['Username'] = username
    body['Password'] = password
    body['ApplicationID'] = 'Irrelevent'
    logonBody = json.dumps(body)

    # build the header and url
    myURL = dispatcher + "/EPM/API/Auth/EPM/Logon"
    hdr = {'Content-Type': 'application/json'}

    # make the Rest API call
    urllib3.disable_warnings()

    return requests.post(myURL, headers=hdr, data=logonBody)

        EPM Authentication
        This method authenticates the user to EPM using username and password and returns
        a token that can be used in subsequent Rest API calls.
        After the configured timeout expires, users have to logon again using their
        username and password.
        The session timeout for all APIs is part of the session token and is defined by the
        Timeoutforinactivesession Server Configuration parameter.
        Args:
            diapatcher (str): The EPM SaaS site to get version information from and perform the initial logon
            username (str): Valid User ID with access to the Set(s)
            password (str): Password for the User ID logging into the Rest API

        Returns:
            list: Json list containing the EPMAuthenticationResult, ManagerURL, IsPasswordExpired (True/False)
    
Solutions/CyberArkEPM/DataConnectors/CyberArkEPMSentinelConnector/pyepm.py