question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SPSite: Issue with encoding when using custom ADFS claims provider

See original GitHub issue

Details of the scenario you tried and the problem that is occurring Trying to create a site collection in which the Owner Alias is under a custom ADFS claims provider, the resulting MOF file changes the encoding and the characters that SharePoint understands. Making imposible to create a site collection under this scenario.

Verbose logs showing the problem VERBOSE: [Machinename]: [[SPSite]SiteName] Starting New-SPSite with the following parameters: Name=My Test Site; OwnerAlias=i:0ǵ.t|ADFS DEV|accountname; Template=STS#0; Url=https://testsite.com/sites/MyTestSite; Verbose=True … Exception of type ‘System.ArgumentException’ was thrown. Parameter name: encodedValue + CategoryInfo : InvalidData: (Microsoft.Share…SPCmdletNewSite:) [], CimException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSite + PSComputerName : localhost Exception of type ‘System.ArgumentException’ was thrown. Parameter name: encodedValue + CategoryInfo : InvalidData: (Microsoft.Share…SPCmdletNewSite:) [], CimException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSite + PSComputerName : localhost

Suggested solution to the issue Ensure the encoding is UTF-8 . Follow the explanation link to claims encoding in SharePoint here: https://social.technet.microsoft.com/wiki/contents/articles/13921.sharepoint-20102013-claims-encoding.aspx

The DSC configuration that is used to reproduce the issue (as detailed as possible)

SPSite SiteName{
            Url                  = "Url=https://testsite.com/sites/MyTestSite"
            OwnerAlias           = "i:0ǵ.t|ADFS DEV|accountname"
            Name                 = "My Test Site"
            Template             = "STS#0"
            PsDscRunAsCredential = $SetupAccount
            DependsOn            = "[SPWebApplication]Webapp";
        }

The operating system the target node is running OsName : Microsoft Windows Server 2016 Standard

Version of SharePoint that is used SharePoint 2016

Version and build of PowerShell the target node is running 5.1.17763.592

Version of the DSC module that was used 3.6.0.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
ykuijscommented, Sep 10, 2019

Done! Please check your email.

0reactions
Jocorteslopezcommented, Sep 24, 2019

Hello Yorick,

Yes absolutely this can be close.

Thanks so much

Jose Manuel Cortes Lopez

Read more comments on GitHub >

github_iconTop Results From Across the Web

SPSite: Issue with encoding when using custom ADFS ...
Trying to create a site collection in which the Owner Alias is under a custom ADFS claims provider, the resulting MOF file changes...
Read more >
New-SPSite - Could not find user when using SAML Claims
I have a Host Header web application https://example.com (SharePoint 2013) where users will login from ADFS using SAML Claims. I am in the ......
Read more >
How Claims encoding works in SharePoint 2010
The claim encoding in SharePoint 2010 is an efficient and compact way to represent a claim type and claim value, compared to writing...
Read more >
Claims authentication does not validate user in SharePoint ...
If the message indicates that authentication failed, you have an authentication problem. If the resource is contained within a SharePoint web ...
Read more >
SharePoint 2010 – Convert to claims with ADFS 2.0 | NoA Ignite
CONVERT ALL USERS AND GROUPS LOGIN NAMES TO SAML ENCODING. The problem is that after you “paired” ADFS with SharePoint and selected TIP...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found