Integrations/MicrosoftGraphFiles/MicrosoftGraphFiles.py
def parse_key_to_context(obj):
    """Parse graph api data as received from Microsoft Graph API into Demisto's conventions

    Args:
        item object: a dictionary containing the item data

    Returns:
        A Camel Cased dictionary with the relevant fields.
        groups_readable: for the human readable
        groups_outputs: for the entry context
    """
    parsed_obj = {}
    for key, value in obj.items():
        if key in EXCLUDE_LIST:
            continue
        new_key = RESPONSE_KEYS_DICTIONARY.get(key, key)
        parsed_obj[new_key] = value
        if type(value) == dict:
            parsed_obj[new_key] = parse_key_to_context(value)

    under_score_obj = createContext(parsed_obj, keyTransform=camel_case_to_underscore)
    context_entry = createContext(under_score_obj, keyTransform=string_to_context_key)

    if "Id" in list(context_entry.keys()):
        context_entry["ID"] = context_entry["Id"]
        del context_entry["Id"]
    if "CreatedBy" in list(context_entry.keys()):
        context_entry["CreatedBy"] = remove_identity_key(context_entry["CreatedBy"])
    if "LastModifiedBy" in list(context_entry.keys()):
        context_entry["LastModifiedBy"] = remove_identity_key(
            context_entry["LastModifiedBy"]
        )
    return context_entry
Parse graph api data as received from Microsoft Graph API into Demisto's conventions

    Args:
        item object: a dictionary containing the item data

    Returns:
        A Camel Cased dictionary with the relevant fields.
        groups_readable: for the human readable
        groups_outputs: for the entry context
    
Parse graph api data as received from Microsoft Graph API into Demisto's conventions
Parse graph api data as received from Microsoft Graph API into Demisto ' s conventions
def parse_key_to_context(obj):
    parsed_obj = {}
    for key, value in obj.items():
        if key in EXCLUDE_LIST:
            continue
        new_key = RESPONSE_KEYS_DICTIONARY.get(key, key)
        parsed_obj[new_key] = value
        if type(value) == dict:
            parsed_obj[new_key] = parse_key_to_context(value)
    under_score_obj = createContext(parsed_obj, keyTransform=camel_case_to_underscore)
    context_entry = createContext(under_score_obj, keyTransform=string_to_context_key)
    if "Id" in list(context_entry.keys()):
        context_entry["ID"] = context_entry["Id"]
        del context_entry["Id"]
    if "CreatedBy" in list(context_entry.keys()):
        context_entry["CreatedBy"] = remove_identity_key(context_entry["CreatedBy"])
    if "LastModifiedBy" in list(context_entry.keys()):
        context_entry["LastModifiedBy"] = remove_identity_key(
            context_entry["LastModifiedBy"]
        )
    return context_entry
def parse_key_to_context ( obj ) : parsed_obj = { } for key , value in obj . items ( ) : if key in EXCLUDE_LIST : continue new_key = RESPONSE_KEYS_DICTIONARY . get ( key , key ) parsed_obj [ new_key ] = value if type ( value ) == dict : parsed_obj [ new_key ] = parse_key_to_context ( value ) under_score_obj = createContext ( parsed_obj , keyTransform = camel_case_to_underscore ) context_entry = createContext ( under_score_obj , keyTransform = string_to_context_key ) if "Id" in list ( context_entry . keys ( ) ) : context_entry [ "ID" ] = context_entry [ "Id" ] del context_entry [ "Id" ] if "CreatedBy" in list ( context_entry . keys ( ) ) : context_entry [ "CreatedBy" ] = remove_identity_key ( context_entry [ "CreatedBy" ] ) if "LastModifiedBy" in list ( context_entry . keys ( ) ) : context_entry [ "LastModifiedBy" ] = remove_identity_key ( context_entry [ "LastModifiedBy" ] ) return context_entry
Parse graph api data as received from Microsoft Graph API into Demisto's conventions
Parse graph api data as received from Microsoft Graph API into Demisto ' s conventions
"""Parse graph api data as received from Microsoft Graph API into Demisto's conventions

    Args:
        item object: a dictionary containing the item data

    Returns:
        A Camel Cased dictionary with the relevant fields.
        groups_readable: for the human readable
        groups_outputs: for the entry context
    """
A Camel Cased dictionary with the relevant fields.
groups_readable: for the human readable
groups_outputs: for the entry context
A Camel Cased dictionary with the relevant fields . groups_readable : for the human readable groups_outputs : for the entry context
obj
item object
a dictionary containing the item data
a dictionary containing the item data