Welcome to my blog, stay tunned :
Home | Blogs | Stephane Eyskens's blog

Yammer - SharePoint , beyond the Yammer App for SharePoint - Leverage Open Graph from SharePoint

This blog post was moved to https://stephaneeyskens.wordpress.com/2015/01/21/yammer-sharepoint-beyon...

Comments

Impersonation Token and (401) Unauthorized

Hi Stephane,
I'm attempted to do impersonation in proof of concept console application, and so far I'm able to make calls and get User Id's using my GAT. I ensured that I was a Verified Administrator in Yammer before I created the app. However when I make the call:


string impertoken = MakeYammerRequest(string.Format("https://www.yammer.com/api/v1/oauth/tokens.json?consumer_key={0}&user_id={1}", ClientId, UserId),
null,
GAT,
"token");

When YammerRequest.GetResponse() is fired, I get an 401 unauthorized message. I'm at a loss at what to check to ensure this works.

Regards

Paul.

401

Hi Paul,

According to what you say, you should be fine...To make sure, you should monitor your traffic with Fiddler and see whether the authorization token is sent correctly. If it is and if the token isn't expired, then, I don't see what else you could look at.

Best Regards

Hi for me its error 400, bad request,

Can you please help me with my problem. I'm getting a bad request when getting the impersonationToken. I can get the TargetUserId just fine. Help please..