briandelmsft / SentinelAutomationModules

The Microsoft Sentinel Triage AssistanT (STAT) enables easy to create incident triage automation in Microsoft Sentinel
MIT License
201 stars 55 forks source link

Suggestion to add more steps into documentation of GrantPermissions.ps1 script #450

Closed mgijo closed 1 month ago

mgijo commented 1 month ago

Adding more steps into documentation before execution of GrantPermissions.ps1 script

image

I would suggest we clearly add few more notes in the documentation to have this fixed. Such as mentioning:-

1) To not forget and Install Powershell 7 module 2) Launch Powershell 7 and execute below set of commands:-

Install-Module -Name Az -Repository PSGallery -Force Install-Module Microsoft.Graph.Applications -Scope CurrentUser -Force -AllowClobber Connect-AzAccount Connect-MgGraph

3) And then running the GrantPermissions.ps1 script

briandelmsft commented 1 month ago

Hi @mgijo thanks for the feedback, we're actually in the process of some significant changes to the script, and will be recommending to use cloud shell to execute the new version in the future, this way everyone is coming from a consistent platform so we don't have as much variation to deal with that can lead to odd issues due to PS versions and module versions.

The new version will also work from your own machine, but again you may have version issues that are difficult to predict.

If you want to try the new way (we're still testing but is fully functional):

  1. Start a cloud shell powershell session (storage account is not required)
  2. Run Invoke-WebRequest -Uri https://aka.ms/mstatgrantscript -OutFile GrantPermissions.ps1
  3. Run .\GrantPermissions.ps1

Optionally, if you also want to grant access to the Sample Logic app, run it like this instead: .\GrantPermissions.ps1 -SampleLogicAppName "Sample-STAT-Triage"

mgijo commented 1 month ago

Thanks @briandelmsft . This worked.