Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f85646a
Test-MtCisPasswordExpiry: Only Check domains with isVerified: true to…
blindzero May 9, 2026
fb6ed9e
Merge branch 'main' into main
blindzero May 10, 2026
4871295
Merge branch 'main' into main
SamErde May 11, 2026
3afbde9
Merge branch 'main' into main
SamErde May 12, 2026
c1daf37
Adding failsaife mesures for PasswordValidityPeriodInDays being a string
blindzero May 16, 2026
3e71511
added comments after testing for clarification and improved verbosity
blindzero May 16, 2026
9da1ba0
Merge branch 'main' into main
blindzero May 16, 2026
3d201cc
Potential fix for pull request finding
SamErde May 18, 2026
171ff02
Merge branch 'main' into main
SamErde May 18, 2026
3d998b4
Merge branch 'main' into main
blindzero May 20, 2026
19ef57d
added skip result for unmanaged or unverified domains
blindzero May 20, 2026
83fef75
Potential fix for pull request finding
SamErde May 22, 2026
8ba4cab
Fixing result table headers to match output
blindzero May 22, 2026
7ab7f04
fix verbose output grammar
blindzero May 22, 2026
8f005fe
fix result markdown output to clarify managed and verified domains
blindzero May 22, 2026
7471c47
Merge branch 'main' of https://github.com/blindzero/maester
blindzero May 22, 2026
fc62f4b
Merge branch 'main' into main
blindzero May 22, 2026
009252d
Merge branch 'maester365:main' into main
blindzero May 23, 2026
faf8e23
Merge branch 'maester365:main' into main
blindzero Aug 3, 2026
ad71526
adding tests/Custom/maester-config.json to .gitignore to be used for …
blindzero Aug 4, 2026
3b30c5c
feat: adding GraphRequestTimeout parameter to maester-config.json and…
blindzero Aug 4, 2026
d6673f2
feat: Tests for Invoke-Maester GraphRequestTimeoutSeconds (within all…
blindzero Aug 4, 2026
4d9e84f
Merge branch 'maester365:main' into fix/2079-longrunning-clienttimeou…
blindzero Aug 4, 2026
3a5eb98
docs: adding parameter inline parameter help for GraphRequestTimeoutS…
blindzero Aug 4, 2026
51d5a19
Merge branch 'fix/2079-longrunning-clienttimeoutparameter' of https:/…
blindzero Aug 4, 2026
0c1e7a8
docs: adding GraphRequestTimeoutSeconds to overview.md for global con…
blindzero Aug 4, 2026
c1d89fb
Grammar Improvement for Configuration Overview GraphRequestTimeoutSec…
blindzero Aug 5, 2026
36c61ff
Improve grammar / wording of GraphRequestTimeoutSeconds Parameter Hel…
blindzero Aug 5, 2026
7cf0c5b
avoid parse errors for config file value not number; catch for error …
blindzero Aug 5, 2026
7259085
Merge branch 'main' into fix/2079-longrunning-clienttimeoutparameter
blindzero Aug 9, 2026
b3b3bab
Merge remote-tracking branch 'origin/main' into codex/pr-2098-timeout
merill Aug 13, 2026
dbf1a08
fix: scope Graph timeout overrides
merill Aug 13, 2026
1ca74b4
refactor: set Graph timeout at connection
merill Aug 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions powershell/public/Connect-Maester.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@

Connects using a custom application with client ID f45ec3ad-32f0-4c06-8b69-47682afe0216

.EXAMPLE
Connect-Maester -ClientTimeout 900

Connects to Microsoft Graph with an HTTP client timeout of 900 seconds. This can be useful for long-running tests in large tenants.

.EXAMPLE
Connect-Maester -Service Graph,SharePointOnline -SharePointClientId '<Client ID>'

Expand Down Expand Up @@ -140,6 +145,9 @@
# The Client ID of the app to connect to for Graph. If not specified, the default Graph PowerShell CLI enterprise app will be used. Reference on how to create an enterprise app: https://learn.microsoft.com/powershell/microsoftgraph/authentication-commands?view=graph-powershell-1.0#use-delegated-access-with-a-custom-application-for-microsoft-graph-powershell
[string]$GraphClientId,

# The Microsoft Graph HTTP client timeout in seconds. When omitted, the Microsoft Graph PowerShell SDK default is used.
[double]$ClientTimeout,

# The Client ID of the PnP Entra ID app for SharePoint Online. Required when Service includes SharePointOnline.
# Use Register-PnPEntraIDAppForInteractiveLogin to create a dedicated app, or reuse an existing Maester app
# registration by adding an http://localhost redirect URI and AllSites.FullControl delegated SharePoint permission.
Expand Down Expand Up @@ -358,6 +366,9 @@
if ($TenantId) {
$connectParams['TenantId'] = $TenantId
}
if ($PSBoundParameters.ContainsKey('ClientTimeout')) {
$connectParams['ClientTimeout'] = $ClientTimeout
}

Write-Verbose "🦒 Connecting to Microsoft Graph with parameters:"
Write-Verbose ($connectParams | ConvertTo-Json -Depth 5)
Expand Down
32 changes: 32 additions & 0 deletions powershell/tests/functions/Connect-Maester.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,38 @@ Describe 'Connect-Maester' {
(Get-Command Connect-Maester).Parameters.Keys | Should -Contain 'GitHubOrganization'
}

It 'Offers ClientTimeout as a double parameter' {
$clientTimeoutParameter = (Get-Command Connect-Maester).Parameters['ClientTimeout']

$clientTimeoutParameter | Should -Not -BeNullOrEmpty
$clientTimeoutParameter.ParameterType | Should -Be ([double])
}

It 'Passes an explicit ClientTimeout to Connect-MgGraph' {
Mock Connect-MgGraph -ModuleName Maester {}

Connect-Maester -ClientTimeout 900

Should -Invoke Connect-MgGraph -ModuleName Maester -Times 1 -Exactly -ParameterFilter { $ClientTimeout -eq 900 }
}

It 'Does not pass ClientTimeout to Connect-MgGraph when omitted' {
Mock Connect-MgGraph -ModuleName Maester {}

Connect-Maester

Should -Invoke Connect-MgGraph -ModuleName Maester -Times 1 -Exactly -ParameterFilter { -not $PSBoundParameters.ContainsKey('ClientTimeout') }
}

It 'Does not connect to Graph when ClientTimeout is used with a non-Graph service' {
Mock Connect-MgGraph -ModuleName Maester {}
Mock Connect-MtGitHub -ModuleName Maester {}

Connect-Maester -Service GitHub -ClientTimeout 900

Should -Invoke Connect-MgGraph -ModuleName Maester -Times 0 -Exactly
}

It 'Calls Connect-MtGitHub when -Service GitHub is specified' {
Mock Connect-MtGitHub -ModuleName Maester {}

Expand Down
21 changes: 21 additions & 0 deletions website/docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,24 @@ Install-Module Pester -MinimumVersion 5.7.1 -MaximumVersion 5.7.1 -Scope Current

To learn more or if you run into Pester installation issues see [Pester Installation and Update](https://pester.dev/docs/introduction/installation)

## Graph requests fail with a timeout error

If a test run fails with an error like `The request was canceled due to the configured HttpClient.Timeout of 300 seconds elapsing`, the Microsoft Graph SDK default timeout has been exceeded.

This is most common when using `-IncludeLongRunning` in tenants with a large number of objects.

When using `Connect-Maester`, pass the timeout to the Microsoft Graph connection:

```powershell
Connect-Maester -ClientTimeout 900
Invoke-Maester -IncludeLongRunning
```

If you connect to Microsoft Graph directly, set the timeout on `Connect-MgGraph` before running Maester:

```powershell
Connect-MgGraph -Scopes (Get-MtGraphScope) -ClientTimeout 900
Invoke-Maester -SkipGraphConnect -IncludeLongRunning
```

When `-ClientTimeout` is omitted, the Microsoft Graph PowerShell SDK default is used. The timeout applies to the Graph connection rather than to an individual test or request.