I need to build a flow that will display the SharePoint sites visitors Name and Department. I currently have a flow that displays Name using the get HTTP action with Uri _api/web/siteusers but they do not capture department. I have seen Department included in the Microsoft 365 action. How do i have one flow that will display both Name and Department of site visitors. In addition to this, how do i filter out those who have only visited the SharePoint sites for last month only. Very much appreciated your help!
The URI _api/web/siteusers primarily provides user names and emails but not detailed profile information such as the department. You can use the "Get user profile (V2)" action from the Office 365 Users connector. This action can retrieve rich profile data if users are part of Microsoft 365.
Use a loop to iterate over all site users retrieved using _api/web/siteusers. For each user, call the "Get user profile (V2)" action using their email to retrieve their department and other details.
Was this reply helpful?YesNo
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.