提供商托管的Sharepoint加载项JWT令牌错误 [英] Provider hosted Sharepoint Add-In JWT token error

查看:98
本文介绍了提供商托管的Sharepoint加载项JWT令牌错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好


我们提交了一个提供商托管的Sharepoint AddIn - Bulk Calc和Publish,它一直运行正常,直到它开始提供JWT令牌错误。为了解决这个问题,我们为加载项的已注册客户端ID创建了另一个秘密,并使用新的客户端密钥更新并重新部署了提供者站点
。应用程序仍然提供相同的错误。你能帮我们解决这个问题吗?错误是 -  

无效的JWT令牌。无法解析颁发者令牌。



堆栈跟踪 - [SecurityTokenException:无效的JWT令牌。无法解析颁发者令牌。]
$
Microsoft.IdentityModel.S2S.Tokens.JsonWebSecurityTokenHandler.ReadTokenCore(String token,Boolean isActorToken)+1152

Microsoft.IdentityModel.S2S.Tokens .JsonWebSecurityTokenHandler.ReadToken(String token)+7

CalcDateProviderAppWeb.TokenHelper.ReadAndValidateContextToken(String contextTokenString,String appHostName)+32 b
CalcDateProviderAppWeb.SharePointAcsContextProvider.CreateSharePointContext(Uri spHostUrl,Uri spAppWebUrl,String spLanguage,String spClientTag,String spProductNumber,HttpRequestBase httpRequest)+103 $
CalcDateProviderAppWeb.SharePointContextProvider.CreateSharePointContext(HttpRequestBase httpRequest)+367 $
CalcDateProviderAppWeb.SharePointContextProvider.GetSharePointContext(HttpContextBase httpContext)+106¥
CalcDateProviderAppWeb.SharePointContextProvider.CheckRedirectionStatus(HttpContextBase httpContext,Uri& redirectUrl)+40

CalcDateProviderAppWe b.SharePointContextFilterAttribute.OnActionExecuting(ActionExecutingContext filterContext)+41

System.Web.Mvc.Async.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32 filterIndex)+176 $
System.Web.Mvc。 Async.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32 filterIndex)+644 $
System.Web.Mvc.Async。<> c__DisplayClass33.b__31(AsyncCallback asyncCallback,Object asyncState)+58

System.Web.Mvc.Async.WrappedAsyncResult`1.CallBeginDelegate(AsyncCallback callback,Object callbackState)+14 b
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback,Object state) ,Int32超时)+128

System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeActionMethodWithFilters(ControllerContext controllerContext,IList`1过滤器,ActionDescriptor actionDescriptor,IDictionary`2参数,AsyncCallback回调,对象状态)+197

System.Web.Mvc.Async。<&g t; c__DisplayClass21.b__19(AsyncCallback asyncCallback,Object asyncState)+743 $
System.Web.Mvc.Async.WrappedAsyncResult`1.CallBeginDelegate(AsyncCallback callback,Object callbackState)+14

System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback,Object state,Int32 timeout)+128


谢谢

解决方案


此论坛用于讨论与Office加载项(Office for Office)相关的问题。


我会将此主题移至
开发SharePoint 2013应用程序论坛:


https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=appsforsharepoint


问候,



Hi

We submitted a Provider hosted Sharepoint AddIn - Bulk Calc and Publish, which worked fine until it started giving the JWT token error. To resolve it we created another secret for the Add-In's registered Client Id and updated and redeployed the Provider site with the new client secret. Still the App is giving the same error. Can you please help us out on this. The error is - 
Invalid JWT token. Could not resolve issuer token.

Stack Trace - [SecurityTokenException: Invalid JWT token. Could not resolve issuer token.]
Microsoft.IdentityModel.S2S.Tokens.JsonWebSecurityTokenHandler.ReadTokenCore(String token, Boolean isActorToken) +1152
Microsoft.IdentityModel.S2S.Tokens.JsonWebSecurityTokenHandler.ReadToken(String token) +7
CalcDateProviderAppWeb.TokenHelper.ReadAndValidateContextToken(String contextTokenString, String appHostName) +32
CalcDateProviderAppWeb.SharePointAcsContextProvider.CreateSharePointContext(Uri spHostUrl, Uri spAppWebUrl, String spLanguage, String spClientTag, String spProductNumber, HttpRequestBase httpRequest) +103
CalcDateProviderAppWeb.SharePointContextProvider.CreateSharePointContext(HttpRequestBase httpRequest) +367
CalcDateProviderAppWeb.SharePointContextProvider.GetSharePointContext(HttpContextBase httpContext) +106
CalcDateProviderAppWeb.SharePointContextProvider.CheckRedirectionStatus(HttpContextBase httpContext, Uri& redirectUrl) +40
CalcDateProviderAppWeb.SharePointContextFilterAttribute.OnActionExecuting(ActionExecutingContext filterContext) +41
System.Web.Mvc.Async.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32 filterIndex) +176
System.Web.Mvc.Async.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32 filterIndex) +644
System.Web.Mvc.Async.<>c__DisplayClass33.b__31(AsyncCallback asyncCallback, Object asyncState) +58
System.Web.Mvc.Async.WrappedAsyncResult`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +14
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters, AsyncCallback callback, Object state) +197
System.Web.Mvc.Async.<>c__DisplayClass21.b__19(AsyncCallback asyncCallback, Object asyncState) +743
System.Web.Mvc.Async.WrappedAsyncResult`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +14
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128

Thanks

解决方案

Hi,

This forum is used for discussing issues related to Office Add-in(Apps for Office).

I would move this thread into Developing Apps for SharePoint 2013 forum:

https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=appsforsharepoint

Regards,

Celeste


这篇关于提供商托管的Sharepoint加载项JWT令牌错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆