Closed mgijo closed 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):
Invoke-WebRequest -Uri https://aka.ms/mstatgrantscript -OutFile GrantPermissions.ps1
.\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"
Thanks @briandelmsft . This worked.
Adding more steps into documentation before execution of GrantPermissions.ps1 script
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