Instantly share code, notes, and snippets.

Embed
What would you like to do?
$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