question

josephpatrick-7433 avatar image
0 Votes"
josephpatrick-7433 asked ·

Issue running conditinal access script from github

I am following the instructions in the link below but there is no excel spreadsheet being generated can someone list a visual of this working within PowerShell? I am trying to take advantage of this and I think I am running this wrong.

https://github.com/nicolonsky/ConditionalAccessDocumentation

azure-active-directory
10 |1000 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.

sikumars-msft avatar image
0 Votes"
sikumars-msft answered ·

Hello @josephpatrick-7433 ,

Thanks for reaching out and sorry for delayed response.

I had tried same instructions from the link, but it wasn't working. Therefore, I made small changes in step number 2 , added the following parameter -ContextScope Process along with Connect-Graph as shown below and followed remaining instructions as per the link, which seems to be working for me.


2.Connect to Microsoft Graph

Grant initial consent:
Connect-Graph -Scopes @("Application.Read.All", "Group.Read.All", "Policy.Read.All", "RoleManagement.Read.Directory", "User.Read.All") -ContextScope Process


Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

· Share
10 |1000 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.

josephpatrick-7433 avatar image
0 Votes"
josephpatrick-7433 answered ·

I am trying to run it and it is still not working, it doe snot like the &

I have been trying to make it connect via the connect-graph and it is not letting the script run.

Can you add a screen shot of how it is suppose to be ran? adding a live example will help

· 2 · Share
10 |1000 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.

I did the following to make it work:

Install-Script -Name Invoke-ConditionalAccessDocumentation -Scope CurrentUser -force

  • Used force to update the script version

Connect-Graph -Scopes @("Application.Read.All", "Group.Read.All", "Policy.Read.All", "RoleManagement.Read.Directory", "User.Read.All") -ContextScope Process

  • Authenticated device

CD "C:\Users\$env:USERNAME\Documents\WindowsPowerShell\Scripts\"

.\Invoke-ConditionalAccessDocumentation.ps1


It exported it to the location specified but it did not add the format that was in the screenshots it came out as a blain simple text in cell spreadsheet.... What is being done wrong here?



0 Votes 0 ·
sikumars-msft avatar image sikumars-msft josephpatrick-7433 ·

Hello @josephpatrick-7433 ,

Sorry for delayed response, I would recommend you to post your queries in following GitHub forum, since this post was created and maintained by community member. Thanks

0 Votes 0 ·