-
Notifications
You must be signed in to change notification settings - Fork 448
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
OrgSettings PW Policy #2665
Comments
Unfortunately there are no Graph APIs available for these settings just yet. We made a decision a while back not to call into MSOOnline under the cover. We will leave this one on the backlog until a Graph API equivalent becomes available. //cc @darrelmiller for visibility |
This should work: Import-Module Microsoft.Graph.Identity.DirectoryManagement
Connect-MgGraph -Scopes 'Domain.ReadWrite.All'
$domainId = "contoso.com"
$params = @{
passwordValidityPeriodInDays = 90
passwordNotificationWindowInDays = 15
}
Update-MgDomain -DomainId $domainId -BodyParameter $params
Where:
|
To set Office 365 Passwords to Expire, use the Microsoft 365 Admin Center:
uncheck it.
To set Office 365 Passwords Are Not Set to Expire, use the Microsoft Online
PowerShell Module:
Set-MsolPasswordPolicy -ValidityPeriod 2147483647 -DomainName -
NotificationDays 30
The text was updated successfully, but these errors were encountered: