question

SANNAMATHRussell-9938 avatar image
0 Votes"
SANNAMATHRussell-9938 asked clivewatson-9831 commented

Azure log analytics and Azure AD Sign-in logs

Hi
I have imported Azure AD Sign-in logs to LogAnalytics workspace.
I like to create a web portal where user input some data like user name, Date and time. Based on the user data the web portal should retrieve data from Azure Log Analytics and present it in table format on the web portal.
Any suggestions how can I achieve this?
I can run queries on Azur LogAnalytics to retrieve the data but I like to do the same from a web portal.

azure-webappsazure-monitor
· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@SANNAMATHRussell-9938 Thank you for reaching out. To pull data from Azure Log Analytics with in your web portal you might have to write custom code to invoke the Log Analytics REST API and get the result set and display it with in your web portal. For testing the REST API GET Call and generating the URL, you can always use Azure Log Analytics API Explorer.

Hope this information helps, please review the above information and circle back if you have any further queries.

0 Votes 0 ·

@bharathn-msft Thank you for your reply.
Can I do the similar thing with Power BI? Please share if you have any referral link.
With the REST API, would I be able to pass user input variable to log analytics query? Please share if you have any referral link.

0 Votes 0 ·
bharathn-msft avatar image bharathn-msft SANNAMATHRussell-9938 ·

@SANNAMATHRussell-9938 Thank you for circling back. Currently you can import Log Analytics logs in to PowerBI , if that's not fitting your requirement. Please revert back with more info on your powerBI requirement ? so that we can assist you accordingly.

Regarding the REST API query, when creating the KQL query itself you can incorporate the user input variable and create the URL , below is the sample URL for GET call to Log Analytics API.

 GET https://api.loganalytics.io/v1/workspaces/{workspace-id}/query?query=AzureActivity%20|%20summarize%20count()%20by%20Category
 Authorization: Bearer <access token>

Use Azure Log Analytics API Explorer for testing
16848-query.png

Hope this information helps, please revert back for further queries. Thank you



0 Votes 0 ·
query.png (98.0 KiB)
bharathn-msft avatar image bharathn-msft SANNAMATHRussell-9938 ·

@SANNAMATHRussell-9938 Requesting to review the above information and circle back if you have any further queries. Thank you

0 Votes 0 ·
bharathn-msft avatar image bharathn-msft SANNAMATHRussell-9938 ·

@SANNAMATHRussell-9938 - Please review the above information and get back if you have any further queries. Thank you

0 Votes 0 ·
Show more comments

1 Answer

bharathn-msft avatar image
0 Votes"
bharathn-msft answered

@SANNAMATHRussell-9938 - To pull data from Azure Log Analytics with in your web portal you might have to write custom code to invoke the Log Analytics REST API and get the result set and display it with in your web portal. For testing the REST API GET Call and generating the URL, you can always use Azure Log Analytics API Explorer.

Please review the above information and circle back if you have any further queries. Thank you


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.