Comments on: Practical Graph: Find Sets of Entra ID User Objects or Mailboxes to Process with PowerShell https://practical365.com/find-azure-ad-users-powershell/ Practical Office 365 News, Tips, and Tutorials Mon, 03 Jun 2024 15:52:16 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_274367'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_274367"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/find-azure-ad-users-powershell/#comment-274367 Mon, 11 Sep 2023 12:25:07 +0000 https://practical365.com/?p=58457#comment-274367 In reply to Dennis Kast.

The article says:

Unfortunately, the Graph does not support filtering against the employee type or employee hire date properties (see this page for reference). If you want to filter based on the hire date, create the array of employees as shown above, and use a client-side filter. For example, this code finds employees hired within the last ten years:

]]>
By: Dennis Kast https://practical365.com/find-azure-ad-users-powershell/#comment-274365 Mon, 11 Sep 2023 12:01:24 +0000 https://practical365.com/?p=58457#comment-274365 Hi,

thanks for this good tp!
I want to ask, If it is possible to show also a way how to count “employeeHireDate” so that I can assign license after employeeHireDate is exceeding 6 months for example.

]]>
By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_270641'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_270641"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/find-azure-ad-users-powershell/#comment-270641 Mon, 31 Jul 2023 08:23:37 +0000 https://practical365.com/?p=58457#comment-270641 In reply to Broonie.

Have you asked for Entra ID to retrieve the date for you?

Get-MgUser -Property EmployeeHireDate…

]]>
By: Broonie https://practical365.com/find-azure-ad-users-powershell/#comment-270610 Mon, 31 Jul 2023 03:04:44 +0000 https://practical365.com/?p=58457#comment-270610 In reply to Tony Redmond.

That doesn’t work me. I can see a value for hire date in both the Azure portal and via graph explorer. But no dice with Get-MgUser.

]]>
By: Tony Redmond https://practical365.com/find-azure-ad-users-powershell/#comment-270195 Thu, 27 Jul 2023 23:52:05 +0000 https://practical365.com/?p=58457#comment-270195 In reply to Broonie.

This works for me:

Get-MgUser -UserId Tony@x.com -Property Id, DisplayName, EmplpoyeeHireDate | Ft id, displayName, employeeHireDate

]]>
By: Broonie https://practical365.com/find-azure-ad-users-powershell/#comment-270192 Thu, 27 Jul 2023 23:43:09 +0000 https://practical365.com/?p=58457#comment-270192 Hi Tony,

If I query a user for employeeHireDate using graph explorer (https://graph.microsoft.com/v1.0/users/username@domain.com?$select=displayname,userprincipalname,employeeHireDate it returns a value but if I try to return emplyeeHiredate with get-MGUser ( Get-MgUser -UserId username@domain.com -Property employeehiredate) I get nothing, why is that please? I’m connect to graph with the “user.readwrite.all” scope.

]]>
By: Dinesh https://practical365.com/find-azure-ad-users-powershell/#comment-262539 Tue, 09 May 2023 22:35:43 +0000 https://practical365.com/?p=58457#comment-262539 Thank you for generously sharing your knowledge here. The information provided is truly informative.

]]>