def getUserById()

in scenario-notebooks/UserSecurityMetadata/Entities.py [0:0]


    def getUserById(userId):
        rawoutput = executeProcess(
            f'az ad user show --id {userId} --query [displayName,mail,objectId] --output tsv'.split(' '))
        output = rawoutput.split('\n')
        if len(output) != 3:
            raise Exception(
                f'Unable to get AAD User with Id - {userId}. Error - {rawoutput}')
        else:
            user = User(output[0], output[1], output[2])
            return user