web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Authorization Failure error when trying to upload document on SharePoint from CRM 2016

(0) ShareShare
ReportReport
Posted on by 285

Hi All, We are using On-Prem Dynamics CRM 2016.

We are getting below error when trying to upload a document from CRM 2016 to SharePoint. 

It says authorization failure. But if I click on open location then it allows me to go to the SP site and upload there directly.

But not allowing through CRM. Attached is the error picture. 

Is it something related to the SSL certificate? Can anyone please help.

4331.SP-Error.PNG

I have the same question (0)
  • Tom Jeffries Profile Picture
    145 on at
    RE: Authorization Failure error when trying to upload document on SharePoint from CRM 2016

    Hello nidnani,

    If you're still facing this issue, can you click the "Download Log File" in this message and see what the file says?  That should tell you more, including if it's a certificate issue.  If that file mentions a cryptographic exception, then the certificate is most likely your issue.

    You can share the full error here if you want, just make sure it does not contain any business data or identifying information.

  • nidnani Profile Picture
    285 on at
    RE: Authorization Failure error when trying to upload document on SharePoint from CRM 2016

    Hi Tom,

    Below is the Error Log. Could you please help? As per the error code I found user not authorized. Not sure if I am missing anything.

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Xml.XmlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #0564C225Detail:

    <OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">

     <ErrorCode>-2147220970</ErrorCode>

     <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />

     <Message>System.Xml.XmlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #0564C225</Message>

     <Timestamp>2020-03-26T16:13:34.829069Z</Timestamp>

     <ExceptionRetriable>false</ExceptionRetriable>

     <ExceptionSource i:nil="true" />

     <InnerFault>

       <ErrorCode>-2147088204</ErrorCode>

       <ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic" />

       <Message>The remote server returned 401 unauthorized error. Please contact your administrator.</Message>

       <Timestamp>2020-03-26T16:13:34.829069Z</Timestamp>

       <ExceptionRetriable>false</ExceptionRetriable>

       <ExceptionSource i:nil="true" />

       <InnerFault i:nil="true" />

       <OriginalException i:nil="true" />

       <TraceText i:nil="true" />

     </InnerFault>

     <OriginalException i:nil="true" />

     <TraceText i:nil="true" />

    </OrganizationServiceFault>

  • Tom Jeffries Profile Picture
    145 on at
    RE: Authorization Failure error when trying to upload document on SharePoint from CRM 2016

    Hi nidnani,

    So we aren't seeing anything indicating a certificate issue.  I still wouldn't rule it out entirely.

    Is this error happening for all users?  Or only some?

    Did it start happening recently or has this always been an issue?

    Can you validate the SharePoint Site record?

    Can you re-run the Server-to-Server Integration Wizard?

    One thing to check may be the SharePoint Email field on the User record in Dynamics.  If it has any value, it must be the same value as the user in SharePoint.  If it is blank, it's ignored during authentication.

    I've also seen instances where customers got similar errors because the User Profile Service in SharePoint was not running, and so Dynamics couldn't authenticate with SharePoint.

  • nidnani Profile Picture
    285 on at
    RE: Authorization Failure error when trying to upload document on SharePoint from CRM 2016

    hi, it started happening after we updated claim based certificate on our CRM server.

    I did not perform the initial setup, I am taking over someone else's work 

    The Sharepoint setup in CRM is active and working fine if we open the file location.

    Where would I find the server integration wizard? 

  • Suggested answer
    Tom Jeffries Profile Picture
    145 on at
    RE: Authorization Failure error when trying to upload document on SharePoint from CRM 2016

    Hi nadni,

    In that case, I would recommend carefully reviewing the following documentation, starting with the prerequisites: docs.microsoft.com/.../on-prem-server-based-sharepoint-on-prem

    At a minimum you'll need to make sure the CrmAppPool account has read access to the certificate, and run the CertificateReconfiguration PowerShell.

  • nidnani Profile Picture
    285 on at
    RE: Authorization Failure error when trying to upload document on SharePoint from CRM 2016

    Hi Tom,

    I just came to know that the SharePoint site which we are using is not on-prem. It is cloud-based. 

    And the only different thing that we did was update CBA certificate on our CRM server.

    So do you think after updating the certificate we need to do the integration again?

    Following this doc will help? https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/admin/on-prem-server-based-sharepoint-online 

  • nidnani Profile Picture
    285 on at
    RE: Authorization Failure error when trying to upload document on SharePoint from CRM 2016

    I validated the SharePoint site in CRM and I am getting below error now.

    <exception>The request was aborted: The request was canceled.Access token could not be obtained from: accounts.accesscontrol.windows.net/.../2 for resource: 00000003-0000-0ff1-ce00-000000000000/constco.sharepoint.com@91b6bde9-1eb1-42d6-8375-b37d6a90df4c</exception>

      <errorcode>-2147088205</errorcode>

      <correlation>e608449f-10d1-b000-c6aa-6f11faef5662</correlation>

    </site>

    7416.Unexpected-SP-error.PNG

  • Verified answer
    Tom Jeffries Profile Picture
    145 on at
    RE: Authorization Failure error when trying to upload document on SharePoint from CRM 2016

    Hi nidnani,

    Yes, even with SharePoint Online, you still need to re-run the PowerShell commands.  The documentation specific to Dynamics on-prem and SharePoint Online is here: docs.microsoft.com/.../on-prem-server-based-sharepoint-online

  • nidnani Profile Picture
    285 on at
    RE: Authorization Failure error when trying to upload document on SharePoint from CRM 2016

    Hi Tom, I tried running the PS commands but now I am getting stuck at below error.

    I get this when I try to run this command New-PSSession

    How to get rid of this? Is it related to SPN?

    1602.MicrosoftTeams_2D00_image-_2800_1_2900_.png

  • Tom Jeffries Profile Picture
    145 on at
    RE: Authorization Failure error when trying to upload document on SharePoint from CRM 2016

    This seems to be an error on the PowerShell side.  Using the search term "new-pssession" "winrm cannot process the request" I was able to find some posts of users who have had similar issues.

    Are you on a domain-joined machine?  I think you need to be to do a remote session.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 165

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 148 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans