You can retrieve the onPremisesLastSyncDateTime property via the Graph API/Get-MGGroup cmdlet. For example:
GET https://graph.microsoft.com/v1.0/groups?$select=id,onPremisesLastSyncDateTime
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Out of command support
Get-MsolGroup command's LastDirSyncTime
Please let me know the alternative command.
You can retrieve the onPremisesLastSyncDateTime property via the Graph API/Get-MGGroup cmdlet. For example:
GET https://graph.microsoft.com/v1.0/groups?$select=id,onPremisesLastSyncDateTime
Hi @mitsu
You can use MS Graph PowerShell instead:
Import-Module Microsoft.Graph.Groups
Get-MgGroup -Property "id,displayName,onPremisesLastSyncDateTime"
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.