cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

PowerShell Search-UnifiedAuditLog Webservice Connections

I am trying to follow the Guide to access the UnifiedAuditLogs to build the Stream Data Reporting 

https://flow.microsoft.com/en-us/blog/accessing-office-365-security-compliance-center-logs-from-micr...

 

to build the Stream Data Reporting in this blog, Could anyone provide some assistance to access this data without using basic Auth. As we have MFA enabled this is not possible on my credentials. 

 

https://techcommunity.microsoft.com/t5/Microsoft-Stream-Blog/Global-Admin-Pro-Tip-Learn-how-to-build...

4 REPLIES 4
Highlighted
Resolver I
Resolver I

Re: PowerShell Search-UnifiedAuditLog Webservice Connections

Hi @Tacsi ,

 

Maybe registering an app in Azure and using Active Directory OAuth together with a client secret or a certificate is better alternative for basic authentication?
https://docs.microsoft.com/en-us/office/office-365-management-api/office-365-management-activity-api...

 

I used the same approach for getting my management api subscriptions.

listsubscriptions.png

Highlighted
Advocate I
Advocate I

Re: PowerShell Search-UnifiedAuditLog Webservice Connections

This is the approach I am working on, I am getting closer but still getting an 'Unauthorised' error. I don't work with API's much so a clearer walk through on this would be helpful considering this is being pushed by Microsoft Stream. Once I have access to the API I still need to work out how to get the Stream Activity Logs. 

New Member

Re: PowerShell Search-UnifiedAuditLog Webservice Connectionsork w

 


@Tacsi wrote:

This is the approach I am working on, I am getting closer but still getting an 'Unauthorised' error. I don't work with API's much so a clearer walk through on this would be helpful considering this is being pushed by Microsoft Stream. Once I have access to the API I still need to work out how to get the Stream Activity Logs. 


I was about to post this same question.  I do work with APIs (at least I'm familiar enough, from a sysadmin context), and it just plain isn't working.  I've been able to connect to other APIs (like Azure Graph) so I know the logic works.  But there is no action exposed in azure to authorize for the client app to access the audit log.  I THINK it's a bug in the audit log API in which that API only works with basic auth credentials (which MS is actively driving everyone away from using, in favor of MFA or password-less auth, despite not being able to support it for many use cases).  

 

To date, I've been unable to find anyone in MS who even knows what I'm talking about.  The closest I've come is someone saying to just use "search-unifiedauditlog" which won't work with saved basic auth credentials, or oauth2 grants.  I'm still going at that angle.  

Highlighted
Advocate I
Advocate I

Re: PowerShell Search-UnifiedAuditLog Webservice Connectionsork w

The annoying part is that the Stream Dashboard is promoted as a Pro-Tip and andit's not possible without Basic Auth and that isn't very Pro. 

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (9,044)