[GH-ISSUE #1143] [Feature Request]: Disable inactive guest accounts #619

Closed
opened 2026-03-02 12:43:46 +03:00 by kerem · 3 comments
Owner

Originally created by @SEI-Mkittok on GitHub (Oct 4, 2022).
Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/1143

Description of the new feature - must be an in-depth explanation of the feature you want, reasoning why, and the added benefits for MSPs as a whole.

Normally this type of automation requires "Identity Governance" but this is a heavy lift for most SMBs and frankly overkill.
Monitoring and reducing the guest account clutter in an environment makes for more efficient account management as well as increased security.
I would request this be added to a Standards Policy

PowerShell commands you would normally use to achieve above request

$date = (Get-Date).adddays(-90)
$zuludate = get-date $date -format "yyyy-MM-ddTHH:mm:ssZ"
$users = Get-MgUser -Filter "signInActivity/lastSignInDateTime le $zuludate"
$users | ? {$_.UserType -eq "Guest"} | ForEach-Object {@{ UserId=$_.Id}} | Update-MgUser -Settings $DisableUserHash -WhatIf
Originally created by @SEI-Mkittok on GitHub (Oct 4, 2022). Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/1143 ### Description of the new feature - must be an in-depth explanation of the feature you want, reasoning why, and the added benefits for MSPs as a whole. Normally this type of automation requires "Identity Governance" but this is a heavy lift for most SMBs and frankly overkill. Monitoring and reducing the guest account clutter in an environment makes for more efficient account management as well as increased security. I would request this be added to a Standards Policy ### PowerShell commands you would normally use to achieve above request ```powershell $date = (Get-Date).adddays(-90) $zuludate = get-date $date -format "yyyy-MM-ddTHH:mm:ssZ" $users = Get-MgUser -Filter "signInActivity/lastSignInDateTime le $zuludate" $users | ? {$_.UserType -eq "Guest"} | ForEach-Object {@{ UserId=$_.Id}} | Update-MgUser -Settings $DisableUserHash -WhatIf ```
Author
Owner

@github-actions[bot] commented on GitHub (Oct 4, 2022):

Thank you for creating a feature request! feature requests are prioritized by our direct contributors. Your current priority is set to "No Priority". If you are a sponsor you can request an upgrade of priority, If you want this feature to be integrated you can always do this yourself by checking out our contributions guide at https://kelvintegelaar.github.io/CIPP/GettingStarted/Contributions.html. Contributors to the CIPP project reserve the right to close feature requests at will.

If your feature request is not picked up in 2 week by a contributor it will be closed.

If you'd like this feature request to be assigned to you, please comment "I would like to work on this please!".

<!-- gh-comment-id:1267559663 --> @github-actions[bot] commented on GitHub (Oct 4, 2022): Thank you for creating a feature request! feature requests are prioritized by our direct contributors. Your current priority is set to "No Priority". If you are a sponsor you can request an upgrade of priority, If you want this feature to be integrated you can always do this yourself by checking out our contributions guide at https://kelvintegelaar.github.io/CIPP/GettingStarted/Contributions.html. Contributors to the CIPP project reserve the right to close feature requests at will. If your feature request is not picked up in 2 week by a contributor it will be closed. If you'd like this feature request to be assigned to you, please comment "I would like to work on this please!".
Author
Owner

@github-actions[bot] commented on GitHub (Oct 14, 2022):

This issue is stale because it has been open 10 days with no activity. We will close this issue soon. If you want this feature implemented you can contribute it. See: https://cipp.app/GettingStarted/Contributions/ . Please notify the team if you are working on this yourself.

<!-- gh-comment-id:1278383246 --> @github-actions[bot] commented on GitHub (Oct 14, 2022): This issue is stale because it has been open 10 days with no activity. We will close this issue soon. If you want this feature implemented you can contribute it. See: https://cipp.app/GettingStarted/Contributions/ . Please notify the team if you are working on this yourself.
Author
Owner

@KelvinTegelaar commented on GitHub (Oct 20, 2022):

added in dev

<!-- gh-comment-id:1285158294 --> @KelvinTegelaar commented on GitHub (Oct 20, 2022): added in dev
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/CIPP#619
No description provided.