![]() ![]() ![]() Provision Windows and Linux VMs in secondsĮnable a secure, remote desktop experience from anywhere $array | Export-Csv "C:\PS\AzureUserSigninLogs.Explore some of the most popular Azure products To get the last logon date for every AAD user in the list, run this command: You can add any other fields if necessary. The CSV file contains information about all user activities: what devices and locations they logged on from, what Microsoft apps they used. $alluserhistory| Export-Csv "C:\PS\azure_signin_logs.csv" –NoTypeInformation To export the result to a CSV file, run the command below: ![]() OS=($viceDetail).operatingSystemĬountry=($resitem.location).countryOrRegion $result = -Method Get).value | Select-Object userDisplayName, userPrincipalName, appDisplayName, ipAddress, clientAppUsed, deviceDetail, =$resitem.appDisplayName $SetDate = Get-Date($SetDate) -format yyyy-MM-dd In this example, I want to get an Azure user activity report for the last 90 days: For example, I want to see the information about a user, operating system, Azure/Microsoft 365 app used for connection and location in the report (these are the following columns: userDisplayName, userPrincipalName, appDisplayName, location, ipAddress, clientAppUsed, deviceDetail, createdDateTime). You can use paging to paginate the results and process multiple objects in a loop using can use the Azure Graph Explorer ( ) to select the names of columns (object attributes) you want to see in the user login history report. Note that the Microsoft Graph API can return up to 1,000 objects at a time. ![]() Make sure that you can get data about user authentication events in Azure: $ConnectGraph = Invoke-RestMethod -Uri "$TenatDomainName/oauth2/v2.0/token" -Method POST -Body $BodyĪfter receiving a token, you can connect to the REST API to get information about user sign-in -Method Get).value Grant the following API permissions to your Azure application that you are using to connect through the Microsoft Graph API: and. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |