Created
May 23, 2020 13:08
-
-
Save mobernberger/91fe0a44457442f0e3de40c650700d43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Start an administrative powershell on your ADFS server | |
$msolId = "urn:federation:MicrosoftOnline" | |
$rptName = "Microsoft Office 365 Identity Platform" | |
$rptRules = (Get-AdfsRelyingPartyTrust -Identifier $msolId).IssuanceTransformRules | |
$newRule = '@RuleTemplate = "LdapClaims" @RuleName = "UPN Claim Rule" c1:[Type == "http://schemas.microsoft.com/ws/2012/01/passwordexpirationtime"] => issue(store = "_PasswordExpiryStore", types = ("http://schemas.microsoft.com/ws/2012/01/passwordexpirationtime","http://schemas.microsoft.com/ws/2012/01/passwordexpirationdays","http://schemas.microsoft.com/ws/2012/01/passwordchangeurl"), query = "{0};", param = c1.Value);' | |
$rptRules = $rptRules + $newRule | |
Set-AdfsRelyingPartyTrust -TargetName $rptName -IssuanceTransformRules $rptRules |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment