@staticmethod
def get_primary_membership(entry):
    """
        Construct primary membership from RID to SID (BloodHound 3.0 only)
        """
    try:
        primarygroupid = int(entry['attributes']['primaryGroupID'])
    except (TypeError, KeyError):
        return None
    return '%s-%d' % ('-'.join(entry['attributes']['objectSid'].split('-')[
        :-1]), primarygroupid)
