0

We are trying to connect Sharepoint online instance using SAML Authentication. We are trying to create site using Rest API. As we are using SAML authentication , we need to use /contextinfo to obtain request digest. This was working absolutely fine , but not sure why it is throwing error 403 now.

Following is the request sample :

URL: https://yourdomain.sharepoint.com/_api/contextinfo,
headers: {
Cookie: rtFa=xxxx;FedAuth=xxx;
Origin: yourdomain.sharepoint.com
}

<?xml version="1.0" encoding="utf-8"?>
<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
    <m:code>-2147024891, System.UnauthorizedAccessException</m:code>
    <m:message xml:lang="en-US">Access denied. You do not have permission to perform this action or access this resource.</m:message>
</m:error>

Need some help to resolve this issue.

0

You could use Fiddler to check the rtFa and FedAuth to confirm whether the cookie correct.

Demo:

enter image description here

1
  • Hi Lee, thanks for the the help, the API was working fine nearly 3 weeks ago, but it is failing now, need to confirm on one point: is there any changes from API Side, If yes then need help to resolve the same issue. – crk2904 Oct 9 '19 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.