Compartilhar via


Quick Solution 1 : New-SPTrustedIdentityTokenIssuer Exception of type 'System.ArgumentException' was thrown

Error Message 

New-SPTrustedIdentityTokenIssuer: Exception of type 'System.ArgumentException' was thrown.

Parameter name: newObj

At line:1 char:33

+ New-SPTrustedIdentityTokenIssuer
<<<<  -Name "<name>"
-Description "<description>" -Realm <realm>
-ImportTrustCertificate <certificate> -ClaimsMapping <mappings>
-SignInUrl <url> -IdentifierClaim <IdentityClaim>
   
+ CategoryInfo : InvalidData: (Microsoft.Share...dentityProvider:SPCmdletNewSPIdentityProvider) [New-SPTrustedIdentityTokenIssuer],argumentException   
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPIdentityProvider

Causes 

The New-SPTrustedIdentityTokenIssuer will create a SPTrustedLoginProvider named newObj.

The error can occur in the following scenarios:

  • The newObj SPTrustedLoginProvider is null
  • The name(parameter Name) of the SPTrustedLoginProvider has been used
  • The length of the name(parameter Name) of the SPTrustedLoginProvider is larger than 50
  • The certificate(parameter ImportTrustCertificate) for the SPTrustedLoginProvider has been used

 

Solutions

In order to fix the issue, please ensure:

  1. The name of the SPTrustedLoginProvider is not been using
  2. The length of the name is less than 50
  3. The certificate is not been using

Comments

  • Anonymous
    January 01, 2003
    thank you for yoru help. I did not know that I could not use the same cert in my testing. You helped me, thank you.

  • Anonymous
    November 05, 2011
    How can i fix this using the same certificate

  • Anonymous
    January 25, 2012
    Use Powershell to remove and redo the certificate properties or use the set-SPTrustedIdentityTokenIssuer   Get-SPTrustedIdentityTokenIssuer   Remove-SPTrustedIdentityTokenI Set-SPTrustedIdentityTokenIssuer  

  • Anonymous
    June 12, 2014
    Some times we get the error if we do setting securitytokenservice certificate multiple times no need to worry proceed with further steps.

  • Anonymous
    June 12, 2014
    doing the step from CA->security->managetrust->new for a new sts is far better

  • Anonymous
    June 06, 2015
    Had the same probleme and just choose another name for the "-name" param