Bhargava Ch
What is the request digest value?

What is the request digest value?

By Bhargava Ch in SharePoint on Nov 29 2019
  • Sanjay Makwana
    Dec, 2020 25

    Request digest is a client side “token” to validate posts back to SharePoint to prevent attacks where the user might be tricked into posting data back to the server. The token is unique to a user and a site and is only valid for a (configurable) limited time.
    You can get the request digest value as below:

    $.ajax({
    url: _spPageContextInfo.siteAbsoluteUrl + “/_api/web/,,,”,
    method: “POST”,
    headers: {
    “Accept”: “application/json; odata=verbose”,
    “X-RequestDigest”: $(‘#__REQUESTDIGEST’).val()
    },
    success: function (data) {},
    error: function (data, errorCode, errorMessage) {}
    });

    • 1


Most Popular Job Functions


MOST LIKED QUESTIONS