我创建了一个自定义声明提供程序,允许用户从现有网站登录到SharePoint。此问题包括以username @ domain格式提出的UPN索赔。用户可以正常登录,直到在SharePoint Web应用程序web.config中启用mapToWindows
和useWindowsTokenService
下的samlSecurityTokenRequirement
。此时,我收到标准的SharePoint错误消息,并且以下异常在跟踪中可见。Performance Point/Excel Services的Sharepoint声称/ c2wts问题
Exception fetching current thread user in SPUtility.CacheClaimsIdentity: Exception of type 'System.ArgumentException' was thrown.
Parameter name: identity 0.00143314303912927 0.001357
Runtime Tag(tkau) System.ArgumentException: Exception of type 'System.ArgumentException' was thrown.
Parameter name: encodedValue
at Microsoft.SharePoint.Administration.Claims.SPClaimEncodingManager.DecodeClaimFromFormsSuffix(String encodedValue)
at Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.GetProviderUserKey(String encodedSuffix)
at Microsoft.SharePoint.ApplicationRuntime.SPHeaderManager.AddIsapiHeaders(HttpContext context, String encodedUrl, NameValueCollection headers)
at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.PreRequestExecuteAppHandler(Object oSender, EventArgs ea)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
我认为C2WTS模拟部分工作正常,因为如果我禁用由传递UPN声明所代表的AD帐户,然后我得到一个不同的“访问被拒绝”试图登录当在SharePoint中显示错误该用户。
而且中的SharePoint记录它确实出现了UPN已被转换到Windows AD帐户,因为我得到了在日志中以下内容:
Verbose ____Current User=i:DOMAINNAME\SSO_administrator 7b4eac31-d017-429c-87f2-a3100ece6797
更新
看起来也许这不是在SharePoint中使用的受支持设置。但是,如果我离开设置,似乎嵌入SharePoint网站中的Performance Point和Excel Services报告无法正常工作。我得到这样的错误:
The data connection uses Windows Authentication and user credentials could not be delegated.
(EXCEL)$Resources:ppsma.ServerCommon, ErrorCode_DataSourceCannotGetWindowsIdentityForNonWindowsClaim;
(表现来看SSRS报告)
有没有办法解决?我需要用户的UPN作为用于查询这些SSAS数据的帐户,因此使用固定连接字符串是不可行的。
我一如往常,实施AD自定义集成与我的内部网门户时,username @ domain与DOMAIN \ username相同,但这不正确。事实上,windows itentity提供者正在使用称为“short”主体名称的形式:DOMAIN \ username,但长格式与dfault ASP.NET登录表单几乎不兼容,因为'[email protected]。name'不能自动翻译成缩写形式,所以每次用户连接到我的Intranet门户时,我都会手动调用ActiveDirectory模拟 –
尝试使用SPContext.Current.User.Identity.Name作为参数 –