ASD's Blueprint for Secure Cloud

Configuration assessment

This page describes methods used to assess configuration drift in a Microsoft 365 service.

Estimated reading time: 4 minutes

Overview

Microsoft 365 Desired State Configuration (M365DSC) is a configuration-as-code tool developed by Microsoft to automate the configuration of Microsoft 365 services. M365DSC can also be used to undertake automated assessment of an M365 configuration in order to complement manual and other automated assessment tools.

Manual assessment of configurations should be the primary assessment method, or it should be used in conjunction with an automated tool to address any gaps in tool coverage and for validating assessment tool reports.

When comparing your targeted M365 service against the guidance in the Blueprint’s configuration pages, consideration should be given to the reasons behind any deviations, and if the deviations are appropriate in the current context.

The mechanism described below will automatically assess approximately half of the Blueprint configurations, the remainder will require manual assessment.

Automated Microsoft 365 Desired State Configuration Assessment

M365DSC performs an assessment by comparing an M365 service’s configuration to a DSC Blueprint. A DSC Blueprint is a file with a .ps1 extension that includes a set of configuration / a configuration profile. By using the DSC files published in the Blueprint as the DSC Blueprint files, a user can perform an assessment of the configuration of an M365 service against the Blueprint.

While these DSC Blueprints can be extended to include complementary metadata to contextualise an assessment report (rather than linking directly to the relevant Blueprint Design Decision), this is not currently in scope.

1. Complete the prerequisite tasks
  • A Windows host and specific credentials are required to use DSC, instructions on setting these up are in the DSC setup page.
2. Copy the DSC files
  • On the Windows host used for assessment, copy the DSC file for the targeted M365 service to your working folder and rename it to have a .M365 extension. The DSC file is a .ps1 file and can be found on each services page below:
ServiceAutomated assessment mechanismAutomated assessment coverage
Entra ID- Desired State ConfigurationPartial
Microsoft 365- N/ANone
Microsoft Intune- Desired State ConfigurationPartial
Microsoft Defender- Desired State ConfigurationPartial
Microsoft Purview- Desired State ConfigurationPartial
Exchange Online- Desired State ConfigurationPartial
SharePoint Online- Desired State ConfigurationPartial
Microsoft Teams- Desired State ConfigurationFull
Power Platform- N/ANone
3. Assess the configuration
  • Authenticate to your Entra ID tenant with an account with permissions to read the target M365 service’s configurations:
$creds = Get-Credential
  • Execute the following command to assess the configuration, substituting the full file and folder paths:
Assert-M365DSCBlueprint -BluePrintUrl <path to .M365 file> -OutputReportPath <path to HTML folder> -Credentials $creds

This will generate a HTML report comparing the targeted M365 service’s configuration to the DSC Blueprint file.

3a. Assess the configuration - alternative

It is also possible to execute the Assert-M365DSCBlueprint command using the credentials created during the DSC setup process. This can be useful if a less-interactive execution of an assessment is required, or when delegating execution of an assessment to another user.

With additional arguments, the parameters used in the configuration data file can replace the -Credentials $creds part of the command:

  • substitute <organisation.onmicrosoft.com> for the primary domain name of the tenant to assess
  • substitute <GUID> for the application ID of the service principal used for assessment
  • substitute <thumbprint hash> for the thumbprint of the certificate used to authenticate the service principal
Assert-M365DSCBlueprint -BluePrintUrl <path to .M365 file> -OutputReportPath <path to HTML folder> -TenantId <organisation.onmicrosoft.com> -ApplicationId <GUID> -CertificateThumbprint <thumbprint hash>
4. Manually assess configurations and evaluate deviations
  • Verify the M365 service’s configurations against the Blueprint’s configuration pages, noting where the generated HTML provides assessment coverage.
  • Evaluate configuration deviations and modify as required.

Configuration

Tools

References

Do you have a suggestion on how the above page could be improved? Get in touch! ASD's Blueprint for Secure Cloud is an open source project, and we would love to get your input. Submit an issue on our GitHub, or send us an email at blueprint@asd.gov.au

Acknowledgement of Country icon

Acknowledgement of Country
We acknowledge the Traditional Owners and Custodians of Country throughout Australia and their continuing connections to land, sea and communities. We pay our respects to them, their cultures and their Elders; past, present and emerging. We also recognise Australia's First Peoples' enduring contribution to Australia's national security.

Authorised by the Australian Government, Canberra