Azure AD sync information in Powershell/Event Viewer

Jan.Sebek 0 Reputation points

Hello Community When you search for "Access Work or School" in windows start menu you get list of all AzureAD links tied to account, clicking on entry in list shows Info button under which you can find bunch of information like enforced policies, timedate of last sync and button to enforce the sync now. I wonder if I can display that information in powershell console. Additional question would be: where I can find events like syncing with Azure Directory in Event Viewer.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,824 questions
Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
570 questions
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,172 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,889 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Marilee Turscak-MSFT 34,791 Reputation points Microsoft Employee

    Hi @Jan.Sebek ,

    To get information about the last sync time of a user via Powershell, you can use the Get-MsolUser command.

    (Get-MsolUser -UserPrincipalName ‘’).LastDirSyncTime

    You can use Get-EventLog to view the events on a local computer.

    To view applied Conditional Access policies, you can use Get-MgAuditLogSignIn or check the Azure AD sign-in logs.

    To view activity logs, you can use the Microsoft Graph API.

    Let me know if this is what you are looking for and if you have further questions.

    If the information helped you, please Accept the answer. This will help us as well as others in the community who may be researching similar information.

    0 comments No comments