I followed the blog to develop an application that reads mails of users without having them signed in: http://blogs.msdn.com/b/exchangedev/archive/2015/01/21/building-demon-or-s
The error indicates there's a problem with your signature. Comparing with a working one, it is way shorter. Be sure you're signing the string with an RSA SHA-256 hash. Using HMAC is probably causing the issue.