Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom tests using Exchange Online and Azure Pipelines #636

Open
Oxyle1025 opened this issue Jan 22, 2025 · 0 comments
Open

Custom tests using Exchange Online and Azure Pipelines #636

Oxyle1025 opened this issue Jan 22, 2025 · 0 comments

Comments

@Oxyle1025
Copy link

Oxyle1025 commented Jan 22, 2025

Good evening everyone,

Passed weeks I've been busy writing some custom tests for a customer regarding Exchange Online. I've got approx. 14 customized tests. However after shifting my workload from my local desktop to Azure Pipelines. All my tests currently fail, most of these errors regarding:

CommandNotFoundException: The term 'Get-AdminAuditLogConfig' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

CommandNotFoundException: The term 'get-sharingpolicy' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

And a few more of these, I've got a scriptblock that forces a import of the required module:

BeforeAll {
        Install-Module ExchangeOnlineManagement -Scope CurrentUser -AllowClobber -Force -Verbose
    }

That does fix is locally, but after moving it to Azure Pipelines / DevOps, all thoses tests just fail. I've tried adding the import stages to the YAML file but that produces the same result.

Followed this guide: https://maester.dev/docs/monitoring/azure-devops#optional-grant-permissions-to-exchange-online

And gave the Workload Identity the following permissions:

Image

Are there any ideas of suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant