This article is a documentation for another script which I have written and would like to make available to the community.

The script refers to the conditional access policies. And can be used in several ways.
The admin should be able to create a simple report of the existing conditional access policies for his customers.
This works as an HTML report, but also as a CSV report.

The admin also has the option of exporting the existing conditional access policies and importing them into another tenant.
The idea is that a “gold config” can be created with standardized conditional access policies, which can then be used for other tenants.
This ensures that all customers have the identical configuration.

 

Script functionality:

The script can be started without prior adjustments.
It works as follows:
When the script is started, the first thing that appears is a small menu with the following items:

  1. Create HTML
  2. Create CSV
  3. Export CA Policies
  4. Import CA Policies

A connection to the Microsoft 365 tenant only takes place after the corresponding menu item is selected.
In the application example here, I have opted for the first option, Generate HTML Report.
After the appropriate credentials have been entered, the script uses the Microsoft Graph interface to execute the desired tasks.
It also shows which authorizations are required.

Then the desired HTML report is created, which is saved in the same location from where the script is executed.

 

Get the Script

As always, although I have tested and used the script several times, I cannot and will not accept any liability for the use of this script.
Readers who download the script are free to customize it according to their needs. Commercial use is allowed, but monetarization requires my explicit permission.