web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Cant get user Account ...
Power Automate
Unanswered

Cant get user Account status when implementing Get group members action from Azure AD.

(1) ShareShare
ReportReport
Posted on by 2

Can someone please help, I am working on a task to get memnbers list from Azure AD security group and email to a User. I can ble to generate a CSV report with Name, Email address and want to add additional column of user Account Status (Enabled/Disabled). I have used Get Group members in Azure AD to get the list and created CSV table to add columns of Name and Email address, but i couldn't see Account status field.

 

Is there a way i can get this information to add in to my CSV table?

 

I have used  item()?['accountstatus'] as custom Expression and that didnt work.

 

 

Categories:
I have the same question (0)
  • sandeepstw Profile Picture
    312 Moderator on at

    Hi There,

     

     Create a variable grpMembersArray to hold data. Then use 'apply to each' on 'Get group members'. To get user Id use -

     

     userId: "items('Apply_to_each')?['id']

     

    Then use 'append array variable' action and in append to array put grpMemberArray. and put values like 

     

     Name: "@outputs('Get_user')?['body']?['displayName']

     Email: "@outputs('Get_user')?['body']?['mail']

     AccountStatus: "@if(equals(outputs('Get_user')?['body']?['accountEnabled'], true), 'Enabled', 'Disabled') 

     

    After 'apply to each' control use action 'Create CSV table' to convert array in csv. 

     

    Please give kudos and mark as solution if it helps.  

      

    Thanks, 

    Sandeep Mishra 

     

  • SunilRangu Profile Picture
    2 on at

     Sorry I am totally lost, I am new to Power Automate and I dint quite understand the instructions. Is that okay if you can elaborate 

  • sandeepstw Profile Picture
    312 Moderator on at

    Hi,

     

    for variable check this link - https://www.youtube.com/watch?v=6WrDNeGfT0I

    apply to each - https://www.youtube.com/watch?v=d99Rr5djcME

    for csv - https://www.youtube.com/watch?v=UzRe2T0ii8o&t=6s 

     

    Hope it all helps to understand what I given above. 

     

    Please give kudos and mark as solution if it helps.  

      

    Thanks, 

    Sandeep Mishra 

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard