def search_roles_by_name(api, configuration, api_version, api_exception, role_name):
    """ Searches for a role by name and returns the ID.

    :param api: The Deep Security API modules.
    :param configuration: Configuration object to pass to the api client.
    :param api_version: The version of the API to use.
    :param api_exception: The Deep Security API exception module.
    :param role_name: The role name to search.
    :return: The ID of the found role, or None if no role is found.
    """

    # Store the role ID - default is None
    role_id = None
    
    # Search criteria
    name_criteria = api.SearchCriteria()
    name_criteria.field_name = "name"
    name_criteria.string_value = role_name
    name_criteria.string_test = "equal"

    # Search filter
    role_filter = api.SearchFilter()
    role_filter.search_criteria = [name_criteria]

    # Perform the search and obtain the ID of the returned role
    try:
        # Perform the search
        admin_roles_api = api.AdministratorRolesApi(api.ApiClient(configuration))
        roles = admin_roles_api.search_administrator_roles(api_version, search_filter=role_filter)

        if len(roles.roles) > 0:
            role_id = roles.roles[0].id

            return "The role ID for the " + str(role_name) + " role is " + str(role_id) + "."

    except api_exception as e:
        return "Exception: " + str(e)