SOLVED

Segregate AWS accounts in Azure Sentinel

%3CLINGO-SUB%20id%3D%22lingo-sub-2613569%22%20slang%3D%22en-US%22%3ESegregate%20AWS%20accounts%20in%20Azure%20Sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2613569%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Team%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20new%20to%20Azure%20sentinel%2C%20trying%20to%20explore%20sentinel%20features.%20I%20have%20already%20registered%20couple%20of%20AWS%20accounts%20in%20the%20sentinel%20and%20data%20is%20been%20ingesting%20from%20the%20time%20of%20connection.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20wanted%20to%20understand%20that%2C%20is%20it%20possible%20to%20view%20the%20data%2Flogs%20with%20respect%20to%20individual%20AWS%20account%20in%20sentinel%20workbook.%20For%20example%3A%20If%20I%20go%20to%20%22AWS%20Network%20Activities%22%20workbook%20in%20the%20sentinel%2C%20is%20it%20possible%20to%20view%20the%20statistics%20with%20respect%20to%20individual%20account%20rather%20for%20all%20the%20registered%20accounts%3F%20and%20also%20Is%20there%20a%20way%20to%20group%20%2Fsegregate%20aws%20accounts%20in%20the%20sentinel%20so%20that%20we%20can%20have%20multiple%20groups%20with%20respect%20to%20the%20different%20environments%20and%20can%20view%20only%20particular%20accounts%20data%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20help%20me%20out%20in%20understanding%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance...!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2614727%22%20slang%3D%22en-US%22%3ERe%3A%20Segregate%20AWS%20accounts%20in%20Azure%20Sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2614727%22%20slang%3D%22en-US%22%3EYep%20you%20can%20do%20that%2C%20you%20will%20need%20to%20save%20a%20copy%20of%20the%20workbook%20and%20edit%20it%20to%20make%20some%20changes.%20The%20best%20way%20is%20to%20make%20a%20dynamic%20drop%20down%20parameter%20which%20includes%20all%20your%20AWS%20Account%20numbers%20-%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fvisualize%2Fworkbooks-dropdowns%23creating-a-dynamic-drop-down-parameter%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fvisualize%2Fworkbooks-dropdowns%23creating-a-dynamic-drop-down-parameter%3C%2FA%3E.%20If%20you%20write%20a%20kusto%20query%20that%20returns%20all%20your%20AWS%20account%20numbers%2C%20it%20will%20then%20make%20that%20a%20drop%20down%20list%20for%20you.%3CBR%20%2F%3E%3CBR%20%2F%3EThen%20you%20need%20to%20edit%20the%20queries%20in%20the%20workbook%20to%20reference%20that%20parameter%20so%20that%20when%20you%20select%20one%20particular%20account%20from%20your%20list%2C%20your%20queries%20will%20automatically%20update%20for%20you%20-%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fvisualize%2Fworkbooks-dropdowns%23in-kql%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fvisualize%2Fworkbooks-dropdowns%23in-kql%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2618344%22%20slang%3D%22en-US%22%3ERe%3A%20Segregate%20AWS%20accounts%20in%20Azure%20Sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2618344%22%20slang%3D%22en-US%22%3EThank%20you%20for%20the%20inputs%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1085960%22%20target%3D%22_blank%22%3E%40m_zorich%3C%2FA%3E.%20With%20the%20help%20of%20above%20article%20I%20am%20able%20to%20create%20a%20new%20parameter%20and%20display%20individual%20AWS%20account%20ID's%20in%20the%20drop%20down%20button.%20could%20you%20please%20help%20me%20with%20referencing%20parameter%20value%20in%20the%20KQL.%20How%20should%20I%20pass%20the%20selected%20aws%20account%20ID%20from%20the%20dropdown%20to%20the%20KQL%20query%20so%20that%20it%20will%20give%20me%20the%20statistics%20with%20respect%20to%20only%20the%20selected%20account%20ID.%20Could%20you%20please%20help%20me%20with%20the%20sample%20query%20and%20the%20procedure%3F%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20used%20below%20query%20to%20display%20aws%20account%20ID's%20in%20the%20dropdown%20parameter.%3CBR%20%2F%3E%3CBR%20%2F%3EAWSCloudTrail%3CBR%20%2F%3E%7C%20distinct%20UserIdentityAccountId%3CBR%20%2F%3E%3CBR%20%2F%3Ecould%20you%20please%20help%20me%20with%20the%20next%20step.%20Thanks%20for%20your%20patience%2C%20please%20do%20not%20mind%20as%20I%20am%20very%20new%20to%20this.%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi Team,

 

I am new to Azure sentinel, trying to explore sentinel features. I have already registered couple of AWS accounts in the sentinel and data is been ingesting from the time of connection.

 

I wanted to understand that, is it possible to view the data/logs with respect to individual AWS account in sentinel workbook. For example: If I go to "AWS Network Activities" workbook in the sentinel, is it possible to view the statistics with respect to individual account rather for all the registered accounts? and also Is there a way to group /segregate aws accounts in the sentinel so that we can have multiple groups with respect to the different environments and can view only particular accounts data ?

 

Please help me out in understanding this?

 

Thanks in advance...!

 

 

4 Replies
Yep you can do that, you will need to save a copy of the workbook and edit it to make some changes. The best way is to make a dynamic drop down parameter which includes all your AWS Account numbers - https://docs.microsoft.com/en-us/azure/azure-monitor/visualize/workbooks-dropdowns#creating-a-dynami.... If you write a kusto query that returns all your AWS account numbers, it will then make that a drop down list for you.

Then you need to edit the queries in the workbook to reference that parameter so that when you select one particular account from your list, your queries will automatically update for you - https://docs.microsoft.com/en-us/azure/azure-monitor/visualize/workbooks-dropdowns#in-kql
Thank you for the inputs @m_zorich. With the help of above article I am able to create a new parameter and display individual AWS account ID's in the drop down button. could you please help me with referencing parameter value in the KQL. How should I pass the selected aws account ID from the dropdown to the KQL query so that it will give me the statistics with respect to only the selected account ID. Could you please help me with the sample query and the procedure?

I have used below query to display aws account ID's in the dropdown parameter.

AWSCloudTrail
| distinct UserIdentityAccountId

could you please help me with the next step. Thanks for your patience, please do not mind as I am very new to this.
best response confirmed by rslakkappa (New Contributor)
Solution
No problems at all, so if you have called your parameter AWSAccountID for example, then in your other queries you add

AWSCloudTrail
| where UserIdentityAccountId == '{AWSAccountID}'

Then the rest of your query, maybe try it out with a simple query like returning the count of the records to test it is changing as you would expected

AWSCloudTrail
| where UserIdentityAccountId == '{AWSAccountID}'
| count
Thank you so much @m_zorich. It did solve my problem. Thank you for the quick response and guidance, appreciate it.. :)