none
/_api/contextinfo Error RRS feed

  • Question

  • I have a single page application that interacts with SharePoint strictly through the use of its web services. Some parts are using CSOM and others are using REST. On page load it calls contextinfo to get the __REQUESTDIGEST value. Recently that call stopped working and now gives a vague error message. All users of the site have an AD account and should be authenticated using windows authentication.

    The only change that happened recently is that the web application changed from using Classic authentication to using Claims based. I am not sure if this issue started right after that but it could be related.

    Https://[hostHeaderSiteURL]/_api/contextinfo
    Request Error
    The server encountered an error processing the request. See server logs for more details.

    Server Log:

    02/01/2017 10:14:17.87 w3wp.exe (0x2550)                       0x6884 SharePoint Foundation         Monitoring                     nasq Medium   Entering monitored scope (Request (GET:https://[url]/_api/contextinfo)). Parent No  
    02/01/2017 10:14:17.87 w3wp.exe (0x2550)                       0x6884 SharePoint Foundation         Logging Correlation Data       xmnv Medium   Name=Request (GET:https://[url]/_api/contextinfo) 84cdd09d-70d9-105e-dc2c-114f79b16d8c
    02/01/2017 10:14:17.87 w3wp.exe (0x2550)                       0x6884 SharePoint Foundation         Micro Trace                   uls4 Medium   Micro Trace Tags: 0 nasq 84cdd09d-70d9-105e-dc2c-114f79b16d8c
    02/01/2017 10:14:17.87 w3wp.exe (0x2550)                       0x6884 SharePoint Foundation         Monitoring                     b4ly Medium   Leaving Monitored Scope (Request (GET:https://[url]/_api/contextinfo)). Execution Time=6.19883253318508 84cdd09d-70d9-105e-dc2c-114f79b16d8c

    Wednesday, February 1, 2017 5:21 PM

Answers

  • I found that this error was caused by the claims migration. Below are the steps I was missing to make this work.

    Add-PSSnapin Microsoft.SharePoint.PowerShell

    $wa = get-SPWebApplication TheBrainPRD

    $wa.MigrateUsers($true)

    $wa.ProvisionGlobally()

    • Marked as answer by Swazimodo1 Wednesday, February 1, 2017 8:34 PM
    Wednesday, February 1, 2017 8:34 PM

All replies

  • I found that this error was caused by the claims migration. Below are the steps I was missing to make this work.

    Add-PSSnapin Microsoft.SharePoint.PowerShell

    $wa = get-SPWebApplication TheBrainPRD

    $wa.MigrateUsers($true)

    $wa.ProvisionGlobally()

    • Marked as answer by Swazimodo1 Wednesday, February 1, 2017 8:34 PM
    Wednesday, February 1, 2017 8:34 PM
  • Hi Swazimodo,

    Thanks for your sharing and it will help others who stuck with the same issue in the forum.

    Best Regards


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, February 2, 2017 2:16 AM