Skip to main content

Search

Is it a Person or Group

Comments

1 comment

  • Christof

    Hi Dale
    In my case of getting all members of a SP group including members of nested AAD groups, I'm using Graph API for accessing the AAD group members. In that case I'm checking if the email of the returned "user" is empty. When user.Email is available -> it's a user. When it's an empty string -> it's a security group and I proceed to get all members of this AAD security group.

    var result = [];
    var responseResult = [[@Actions.Send_HTTP_request_get_all_members_of_SP_group.ResponseBody]].d.results;
    if(responseResult.length > 0){    
       responseResult.forEach(user => {
           if(user.Email != ""){
               result.push({"DisplayName": user.Title, "Email": user.Email});
           }
       });
    }
    return result;
    0

Please sign in to leave a comment.