none
CSOM/OData authentication RRS feed

  • Question

  • Hi, in our scenario, we need to use an automatic service (Windows Service without user interaction) to perform CRUD operations on Project Online data. Currently we're using .NET, but we may need to support other platforms in the future. At the moment we're using on-premises Project Server 2013, but plan to migrate to Project Online in the near future.

    In our current on-premises solution, we're using CSOM to communicate with Project Server, using a specific domain account, which works fine. But I'm not sure if this solution will work in Project Online (with onmicrosoft.com accounts). Will it continue to work?

    I've also been trying to use OData (again using Project Server now, but will migrate to Online later). It works fine for read only requests. I can obtain a list of existing projects. But when I tried to create a new project, I got an error: The security validation for this page is invalid and might be corrupted. Please use your web browser's Back button to try your operation again.

    Ideally we'd like to make OData work, as in the future, we may need to communicate with Project Online on none .NET platforms.

    We cannot use OAuth, as this is an automatic service application without user interaction.

    Thanks for any suggestions.


    Sining Oh Blue Star

    Friday, July 12, 2013 7:35 AM

Answers

  • For the server to server scenario, I was able to use the techniques described on http://allthatjs.com/2012/03/28/remote-authentication-in-sharepoint-online/ to successfully authenticate a pre-configured user and then use CSOM/OData. This doesn't come from an official source, but at least it is working for me. Hope it will continue to work in the coming years. For the user interactive scenario (in my case, a provider hosted app), I was able to use OAuth as described on http://msdn.microsoft.com/en-us/library/office/fp142384.aspx

    Be aware if you want to use the reporting OData service, the user must be at least a portfolio manager. The pre-configured account I'm using in server to server scenario is a PWA admin. For the user interaction scenario, I was unable to use reporting OData service due to permission issues (most users are standard PMs), and had to use CSOM only.


    Shining Oh Blue Star

    • Marked as answer by SALX Tuesday, January 21, 2014 3:18 AM
    Tuesday, January 21, 2014 3:17 AM

All replies

  • Hi, Just curious if you were ever able to get an answer for this?  I've been trying with no success to authenticate and access oData in a similar manner (autonomous application) from Project Online (Office365).  We are using ADFS as well, so I'm thinking this has added to the complexity.

    Any feedback is appreciated. Thanks in advance.

    -Michael


    Zambodi

    Wednesday, December 11, 2013 10:46 PM
  • For the server to server scenario, I was able to use the techniques described on http://allthatjs.com/2012/03/28/remote-authentication-in-sharepoint-online/ to successfully authenticate a pre-configured user and then use CSOM/OData. This doesn't come from an official source, but at least it is working for me. Hope it will continue to work in the coming years. For the user interactive scenario (in my case, a provider hosted app), I was able to use OAuth as described on http://msdn.microsoft.com/en-us/library/office/fp142384.aspx

    Be aware if you want to use the reporting OData service, the user must be at least a portfolio manager. The pre-configured account I'm using in server to server scenario is a PWA admin. For the user interaction scenario, I was unable to use reporting OData service due to permission issues (most users are standard PMs), and had to use CSOM only.


    Shining Oh Blue Star

    • Marked as answer by SALX Tuesday, January 21, 2014 3:18 AM
    Tuesday, January 21, 2014 3:17 AM