Forum Discussion
Sunil Guntupalli
May 08, 2018Copper Contributor
Project Online/SharePoint Online "401 Unauthorized" error when accessing oData URLs programatically
Hi All, I couldn't authenticate Project Online oData URLs using the below piece of code in a C# console application. It was working fine till yesterday from past 1 year. SecureString passWord =...
- May 08, 2018
Hi All,
Another work around is to generate a SharePoint client context and then grab the auth cookie from those credentials and pass it to the rest api request.
authCookie = creds.GetAuthenticationCookie()
req.Headers.Add(HttpRequestHeader.Cookie, authCookie);
Let me know if you need more details
Thanks
Dan
Mahidhar Venkata Araveti
May 08, 2018Copper Contributor
Hi Dan,
It seems the solution you have suggested is working. But I want to know whether Microsoft is fixing this issue or going forward we need to use different authentication mechanisms
Regards,
Mahidhar
Daniel Colarossi
May 08, 2018Brass Contributor
HI Mahidhar
I'm trying to chase up the same answer with Microsoft ( i dont work for them). Im chatting with their devs so as soon as i hear back ill post it here.
Thanks
Dan
I'm trying to chase up the same answer with Microsoft ( i dont work for them). Im chatting with their devs so as soon as i hear back ill post it here.
Thanks
Dan