Integrations/MicrosoftGraphGroups/MicrosoftGraphGroups.py
def parse_outputs(groups_data: Dict[str, str]) -> Tuple[dict, dict]:
    """Parse group data as received from Microsoft Graph API into Demisto's conventions

    Args:
        groups_data: a dictionary containing the group data

    Returns:
        A Camel Cased dictionary with the relevant fields.
        groups_readable: for the human readable
        groups_outputs: for the entry context
    """
    # Unnecessary fields, dropping as to not load the incident context.
    fields_to_drop = ['@odata.context', '@odata.nextLink', '@odata.deltaLink', '@odata.type', '@removed',
                      'resourceProvisioningOptions', 'securityIdentifier', 'onPremisesSecurityIdentifier',
                      'onPremisesNetBiosName', 'onPremisesProvisioningErrors', 'onPremisesSamAccountName',
                      'resourceBehaviorOptions', 'creationOptions', 'preferredDataLocation']
    if isinstance(groups_data, list):
        groups_readable, groups_outputs = [], []
        for group_data in groups_data:
            group_readable = {camel_case_to_readable(i): j for i, j in group_data.items() if i not in fields_to_drop}
            if '@removed' in group_data:
                group_readable['Status'] = 'deleted'
            groups_readable.append(group_readable)
            groups_outputs.append({k.replace(' ', ''): v for k, v in group_readable.copy().items()})

        return groups_readable, groups_outputs

    group_readable = {camel_case_to_readable(i): j for i, j in groups_data.items() if i not in fields_to_drop}
    if '@removed' in groups_data:
        group_readable['Status'] = 'deleted'
    group_outputs = {k.replace(' ', ''): v for k, v in group_readable.copy().items()}

    return group_readable, group_outputs
Parse group data as received from Microsoft Graph API into Demisto's conventions

    Args:
        groups_data: a dictionary containing the group data

    Returns:
        A Camel Cased dictionary with the relevant fields.
        groups_readable: for the human readable
        groups_outputs: for the entry context
    
Parse group data as received from Microsoft Graph API into Demisto's conventions
Parse group data as received from Microsoft Graph API into Demisto ' s conventions
def parse_outputs(groups_data: Dict[str, str]) -> Tuple[dict, dict]:
    fields_to_drop = ['@odata.context', '@odata.nextLink', '@odata.deltaLink', '@odata.type', '@removed',
                      'resourceProvisioningOptions', 'securityIdentifier', 'onPremisesSecurityIdentifier',
                      'onPremisesNetBiosName', 'onPremisesProvisioningErrors', 'onPremisesSamAccountName',
                      'resourceBehaviorOptions', 'creationOptions', 'preferredDataLocation']
    if isinstance(groups_data, list):
        groups_readable, groups_outputs = [], []
        for group_data in groups_data:
            group_readable = {camel_case_to_readable(i): j for i, j in group_data.items() if i not in fields_to_drop}
            if '@removed' in group_data:
                group_readable['Status'] = 'deleted'
            groups_readable.append(group_readable)
            groups_outputs.append({k.replace(' ', ''): v for k, v in group_readable.copy().items()})
        return groups_readable, groups_outputs
    group_readable = {camel_case_to_readable(i): j for i, j in groups_data.items() if i not in fields_to_drop}
    if '@removed' in groups_data:
        group_readable['Status'] = 'deleted'
    group_outputs = {k.replace(' ', ''): v for k, v in group_readable.copy().items()}
    return group_readable, group_outputs
def parse_outputs ( groups_data : Dict [ str , str ] ) -> Tuple [ dict , dict ] : fields_to_drop = [ '@odata.context' , '@odata.nextLink' , '@odata.deltaLink' , '@odata.type' , '@removed' , 'resourceProvisioningOptions' , 'securityIdentifier' , 'onPremisesSecurityIdentifier' , 'onPremisesNetBiosName' , 'onPremisesProvisioningErrors' , 'onPremisesSamAccountName' , 'resourceBehaviorOptions' , 'creationOptions' , 'preferredDataLocation' ] if isinstance ( groups_data , list ) : groups_readable , groups_outputs = [ ] , [ ] for group_data in groups_data : group_readable = { camel_case_to_readable ( i ) : j for i , j in group_data . items ( ) if i not in fields_to_drop } if '@removed' in group_data : group_readable [ 'Status' ] = 'deleted' groups_readable . append ( group_readable ) groups_outputs . append ( { k . replace ( ' ' , '' ) : v for k , v in group_readable . copy ( ) . items ( ) } ) return groups_readable , groups_outputs group_readable = { camel_case_to_readable ( i ) : j for i , j in groups_data . items ( ) if i not in fields_to_drop } if '@removed' in groups_data : group_readable [ 'Status' ] = 'deleted' group_outputs = { k . replace ( ' ' , '' ) : v for k , v in group_readable . copy ( ) . items ( ) } return group_readable , group_outputs
Parse group data as received from Microsoft Graph API into Demisto's conventions
Parse group data as received from Microsoft Graph API into Demisto ' s conventions
"""Parse group data as received from Microsoft Graph API into Demisto's conventions

    Args:
        groups_data: a dictionary containing the group data

    Returns:
        A Camel Cased dictionary with the relevant fields.
        groups_readable: for the human readable
        groups_outputs: for the entry context
    """ # Unnecessary fields, dropping as to not load the incident 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
groups_data
Dict[str, str]
a dictionary containing the group data
a dictionary containing the group data