Last active
December 4, 2018 23:39
-
-
Save darrenjrobinson/73693aca213adf80c2411bb25ad21f5d to your computer and use it in GitHub Desktop.
Azure Graph Reporting API Microsoft Identity Manager Reports. Assoicated Blog Post https://blog.darrenjrobinson.com/how-to-access-microsoft-identity-manager-hybrid-report-data-using-powershell-graph-api-and-oauth2/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$TenantDomain = "customer.com.au" | |
$topResults = 10 | |
$reportContent = @() | |
$headerParams = @{'Authorization'="$($Authorization.token_type) $($Authorization.access_token)"} | |
# https://msdn.microsoft.com/en-us/library/azure/ad/graph/howto/azure-ad-reports-and-events-preview#MimSsprActivityEvent | |
# MimSsgmGroupActivityEvent | |
$url = 'https://graph.windows.net/' + $tenantdomain + "/reports/mimSsgmGroupActivityEvents?api-version=beta&`$top=$topResults" | |
# Returns a JSON document for the "MimSsgmGroupActivityEvent" report | |
$MIMGroupActivityEvent = (Invoke-WebRequest -Headers $headerParams -Uri $url).Content | ConvertFrom-Json | |
$MIMGroupActivityEvent.value | |
# MimSsprActivityEvent | |
$url = 'https://graph.windows.net/' + $tenantdomain + "/reports/mimSsprActivityEvents?api-version=beta&`$top=$topResults" | |
# Returns a JSON document for the "MimSsprActivityEvent" report | |
$MIMssprActivityEvent = (Invoke-WebRequest -Headers $headerParams -Uri $url).Content | ConvertFrom-Json | |
$MIMssprActivityEvent.value | |
# MimSsprRegistrationActivityEvent | |
$url = 'https://graph.windows.net/' + $tenantdomain + "/reports/mimSsprRegistrationActivityEvents?api-version=beta&`$top=$topResults" | |
# Returns a JSON document for the "MimSsprRegistrationActivityEvent" report | |
$MIMssprRegistrations = (Invoke-WebRequest -Headers $headerParams -Uri $url).Content | ConvertFrom-Json | |
$MIMssprRegistrations.value | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment