I created a new app by following this tutorial


I was able to press F5 and it showed me the Do you Trust it screen, and I installed.

Code is like this:

public ActionResult Index()
            Uri hostWeb = new Uri(Request.QueryString["SPHostUrl"]);
            using (
                var clientContext = TokenHelper.GetS2SClientContextWithWindowsIdentity(hostWeb,
                var web = clientContext.Web;
                clientContext.Load(web, w=>w.Lists.Include(l=>l.Title).Where(l=>!l.Hidden));

                return View(web.Lists);

I checked the HOST WEB and my username is on the Owners group. I debuggeed and Request.LogonUnserIdentity is showing my username, so that means the app is being executed under my identity which is ok

Whats happening then?

I noticed that when do F5, the url in ths browser is with localhost I had to replace it because this site wont let me put localhost, looool!


I found this on my ULS Logs

SPApplicationAuthenticationModule: Error authenticating request, Error details: Header: 3000006;reason="Token contains invalid signature.";category="invalid_client", Body: {"error_description":"Invalid JWT token. Could not resolve issuer token."}

1 Answer 1


I forgot to run some steps needed for an app to work in a dev environment. They are well explained here.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.