maester365 / maester

The core repository for the Maester module with helper cmdlets that will be called from the Pester tests.
https://maester.dev
MIT License
289 stars 70 forks source link

DISCUSSION: Path to enable additional APIs for tests beyond Graph API #184

Closed Snozzberries closed 2 months ago

Snozzberries commented 3 months ago

I would like to open a discussion around expanding Maester's capabilities to include tests for M365 beyond the Graph API (e.g., Exchange Online, SharePoint Online, Defender, Azure, etc...).

Here are a few initial working options:

  1. Add tests, but skip unless the API in use is authenticated and available. (i.e., Manual out of band authentication)
  2. Add switches to Connect-Maester to support proxying additional modules like Az.Accounts similar to how it handles Graph today.
  3. Utilize an App Registration for these additional APIs, leverage the Az module to create tokens for alternative APIs based on the .default authorizations of the app. Any API not supported by Az will be a limitation.
  4. Transition to an alternative MSAL manager, such as MSAL.PS or .Net implementation.

Please comment with additional options, any strong preference and logic for a specific option, or additional dependencies or considerations as any option is implemented.

merill commented 3 months ago

Whatever we decide we do need to include more details in the docs on writing tests that are not Microsoft Graph and show samples of #1 can be done today (e.g. Connect-AzAccount and calling tests based on Az)

dbrinkmann123 commented 3 months ago

Thanks @Snozzberries for the comment. Agree wholeheartedly with this as we'd like to use a single platform for testing / assessing environments continuously against a set of best practices. I'd like to see more of SCuBA tests for other workloads folded in as well as other applicable ones. As a MSP we desire to host this infrastructure and run this against our customer tenants.