Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Add-PSSnapin "Microsoft.SharePoint.PowerShell"
- $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\users\mariussm.gwrnd\downloads\adfs.goodworkaround.com-PUBLIC.cer")
- $idclaim = New-SPClaimTypeMapping "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier" -IncomingClaimTypeDisplayName "Account ID" –SameAsIncoming
- $map = @($idclaim)
- # Optional additional claims:
- # $map += New-SPClaimTypeMapping “http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name” -IncomingClaimTypeDisplayName “Display Name” –LocalClaimType “http://schemas.goodworkaround.com/identity/claims/name"
- # $map += New-SPClaimTypeMapping "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" -IncomingClaimTypeDisplayName "Surname" –SameAsIncoming
- # $map += New-SPClaimTypeMapping "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" -IncomingClaimTypeDisplayName "Givenname" –SameAsIncoming
- $realm = "urn:sharepoint:azuresp1"
- $signinurl = "https://adfs.goodworkaround.com/adfs/ls/"
- New-SPTrustedIdentityTokenIssuer -Name "adfs.goodworkaround.com" -Description "ADFS 3.0 Goodworkaround" -Realm $realm -ImportTrustCertificate $cert -ClaimsMappings $map -SignInUrl $signinurl -IdentifierClaim $idclaim.InputClaimType
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement