Skip to content

Remove 30-day parameter cap for inactive sign-in user cmdlets (v1.0 + beta)#1601

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-entra-inactive-signin-user-limit
Draft

Remove 30-day parameter cap for inactive sign-in user cmdlets (v1.0 + beta)#1601
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-entra-inactive-signin-user-limit

Conversation

Copy link
Copy Markdown

Copilot AI commented May 14, 2026

Get-EntraInactiveSignInUser and Get-EntraBetaInactiveSignInUser were enforcing a 30-day maximum for -LastSignInBeforeDaysAgo, which contradicted the documented behavior and blocked valid queries such as 90 days. This change removes that artificial upper bound while preserving non-negative input validation.

  • Parameter validation alignment (v1.0 + beta)

    • Updated both cmdlets to accept any non-negative Int32 day value.
    • Replaced the hardcoded max of 30 with [int]::MaxValue.
  • Scope of change

    • module/Entra/Microsoft.Entra/Users/Get-EntraInactiveSignInUser.ps1
    • module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaInactiveSignInUser.ps1
  • Targeted behavioral coverage

    • Added focused unit coverage in both v1.0 and beta test files to assert that values greater than 30 (for example, 90) are accepted and the cmdlet executes its query path.
# Before
[ValidateRange(0,30)]
[int] $LastSignInBeforeDaysAgo = 30

# After
[ValidateRange(0, [int]::MaxValue)]
[int] $LastSignInBeforeDaysAgo = 30

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.powershellgallery.com
    • Triggering command: /usr/bin/pwsh pwsh -NoLogo -NoProfile -Command ./build/Install-Dependencies.ps1 -ModuleName Entra; ./build/Install-Dependencies.ps1 -ModuleName EntraBeta (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@learn-build-service-prod
Copy link
Copy Markdown

Learn Build status updates of commit 346ea7a:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details

  • Line 0, Column 0: [Error: PSMD2Yaml_FileLoadFailed] Failed to load file: C:/LocalRun/W/4unp-s/module/mapping/monikerMapping.json. PackageRoot, ReferenceTocUrl, and ConceptualTocUrl are required for every moniker. PackageRoot should be a valid relative path to docset root.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

Copilot AI and others added 2 commits May 14, 2026 21:48
@learn-build-service-prod
Copy link
Copy Markdown

Learn Build status updates of commit 3148256:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details

  • Line 0, Column 0: [Error: PSMD2Yaml_FileLoadFailed] Failed to load file: C:/LocalRun/W/t2je-s/module/mapping/monikerMapping.json. PackageRoot, ReferenceTocUrl, and ConceptualTocUrl are required for every moniker. PackageRoot should be a valid relative path to docset root.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@learn-build-service-prod
Copy link
Copy Markdown

Learn Build status updates of commit b8d7d51:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details

  • Line 0, Column 0: [Error: PSMD2Yaml_FileLoadFailed] Failed to load file: C:/LocalRun/W/htpv-s/module/mapping/monikerMapping.json. PackageRoot, ReferenceTocUrl, and ConceptualTocUrl are required for every moniker. PackageRoot should be a valid relative path to docset root.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

Copilot AI changed the title [WIP] Fix EntraInactiveSignInUser days limitation Remove 30-day parameter cap for inactive sign-in user cmdlets (v1.0 + beta) May 14, 2026
Copilot AI requested a review from reneemichiko May 14, 2026 21:51
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

Successfully merging this pull request may close these issues.

🪲EntraInactiveSignInUser Days Limitation

2 participants