{"id":8069,"date":"2015-06-16T03:20:24","date_gmt":"2015-06-16T03:20:24","guid":{"rendered":"https:\/\/test.simple-talk.com\/uncategorized\/incorrect-client-id-in-sharepoint-app-package\/"},"modified":"2016-07-28T10:56:42","modified_gmt":"2016-07-28T10:56:42","slug":"incorrect-client-id-in-sharepoint-app-package","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/blogs\/incorrect-client-id-in-sharepoint-app-package\/","title":{"rendered":"Incorrect Client ID in SharePoint App Package"},"content":{"rendered":"<p>Interesting issue today.&#160; I was attempting to install a SharePoint app today and ran into the following error:<\/p>\n<p>8fff7a1f-f0ea-4d73-8c7d-aa97279b6d20 Stack trace:&#160;&#160; <br \/> at Microsoft.SharePoint.SPUser.get_UserToken()&#160;&#160;&#160; <br \/> at Microsoft.SharePoint.Lifecycle.SPAppLifecycleEventCalloutTask.CallRemoteEventReceiver(Uri url, SPAppInstance instance)&#160;&#160;&#160; <br \/> at Microsoft.SharePoint.Lifecycle.SPAppLifecycleEventCalloutTask.CallRemoteEventReceiver(SPAppInstance instance)&#160;&#160;&#160; <br \/> at Microsoft.SharePoint.Lifecycle.SPAppLifecycleEventCalloutTask.Deploy()&#160;&#160;&#160; <br \/> at Microsoft.SharePoint.Administration.SPAppTask.DeployOperation()&#160;&#160;&#160; <br \/> at Microsoft.SharePoint.Lifecycle.MonitoredTaskExecution.DoTask()&#160;&#160;&#160; <br \/> at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&#160;&#160;&#160; <br \/> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&#160;&#160;&#160; <br \/> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)&#160;&#160;&#160; <br \/> at System.Threading.ThreadHelper.ThreadStart()<\/p>\n<p>I Googled the the first line in the error and came across my <a href=\"https:\/\/www.simple-talk.com\/blogs\/2015\/04\/22\/high-trust-certificate-error-adding-app-to-site-in-sharepoint\/\">own blog entry<\/a>, but it was not helpful in this case because the high trust cert was correct.&#160; This time around, my issue was that the Client ID specified when packaging the app was incorrect.&#160; We have multiple applications and the packaging profiles got mismatched.&#160; In general, it looks like if you have a get_UserToken() issue in the call stack, then you&#8217;ve probably misconfigured something.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Interesting issue today.&#160; I was attempting to install a SharePoint app today and ran into the following error: 8fff7a1f-f0ea-4d73-8c7d-aa97279b6d20 Stack trace:&#160;&#160; at Microsoft.SharePoint.SPUser.get_UserToken()&#160;&#160;&#160; at Microsoft.SharePoint.Lifecycle.SPAppLifecycleEventCalloutTask.CallRemoteEventReceiver(Uri url, SPAppInstance instance)&#160;&#160;&#160; at Microsoft.SharePoint.Lifecycle.SPAppLifecycleEventCalloutTask.CallRemoteEventReceiver(SPAppInstance instance)&#160;&#160;&#160; at Microsoft.SharePoint.Lifecycle.SPAppLifecycleEventCalloutTask.Deploy()&#160;&#160;&#160; at Microsoft.SharePoint.Administration.SPAppTask.DeployOperation()&#160;&#160;&#160; at Microsoft.SharePoint.Lifecycle.MonitoredTaskExecution.DoTask()&#160;&#160;&#160; at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&#160;&#160;&#160; at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&#160;&#160;&#160;&#8230;&hellip;<\/p>\n","protected":false},"author":46738,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[],"coauthors":[],"class_list":["post-8069","post","type-post","status-publish","format-standard","hentry","category-blogs"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/8069","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/46738"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=8069"}],"version-history":[{"count":3,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/8069\/revisions"}],"predecessor-version":[{"id":42495,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/8069\/revisions\/42495"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=8069"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=8069"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=8069"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=8069"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}