Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/270.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 具有Hightrust加载项的SharePoint access,SharePoint托管的自定义WCF服务,当前用户为空_C#_Wcf_Sharepoint_Bearer Token_Spcontext - Fatal编程技术网

C# 具有Hightrust加载项的SharePoint access,SharePoint托管的自定义WCF服务,当前用户为空

C# 具有Hightrust加载项的SharePoint access,SharePoint托管的自定义WCF服务,当前用户为空,c#,wcf,sharepoint,bearer-token,spcontext,C#,Wcf,Sharepoint,Bearer Token,Spcontext,我正在使用Azure托管的WebSerie,它使用ADFS进行身份验证,并创建用户访问承载令牌,以便通过提供商托管的加载项与内部SharePoint进行通信 我可以通过标准的SharePoint REST API调用访问SharePoint数据。但是,当我尝试调用托管在同一SharePoint中的自定义WCF服务时,我没有经过身份验证,因此我在httpcontext、spcontext、operationcontext、thread.principal或ServiceSecurityContex

我正在使用Azure托管的WebSerie,它使用ADFS进行身份验证,并创建用户访问承载令牌,以便通过提供商托管的加载项与内部SharePoint进行通信

我可以通过标准的SharePoint REST API调用访问SharePoint数据。但是,当我尝试调用托管在同一SharePoint中的自定义WCF服务时,我没有经过身份验证,因此我在httpcontext、spcontext、operationcontext、thread.principal或ServiceSecurityContext中都没有当前用户、声明或标识

因此,我无法使用自定义SharePoint托管的WCF服务访问SharePoint中的数据

如何以与SharePoint REST API相同的方式强制使用承载访问令牌进行身份验证