Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Getting Authorization failure error-While trying to upload document from CRM 2016 on premise to SharePoint integrated website folders

Posted on by 645

Hi,

Getting Authorization failure error-While trying to upload document from CRM 2016 on premise to SharePoint integrated website folders, even though users is a administrator in both the sites.

The document tried to upload is lesser then 5 Mb in size.

7652.Capture.JPG

7652.Capture1.JPG

*This post is locked for comments

  • Integration Profile Picture
    Integration 645 on at
    RE: Getting Authorization failure error-While trying to upload document from CRM 2016 on premise to SharePoint integrated website folders

    Hi,

    Account we used is having full control on both CRM and sharepoint server.

    I don't renremem whether IIS restart required or not.

  • nidnani Profile Picture
    nidnani 285 on at
    RE: Getting Authorization failure error-While trying to upload document from CRM 2016 on premise to SharePoint integrated website folders

    what user did you choose for running the PowerShell command??

    Once you run the command, did you restarted the iis services?

  • Integration Profile Picture
    Integration 645 on at
    RE: Getting Authorization failure error-While trying to upload document from CRM 2016 on premise to SharePoint integrated website folders

    Hi,

    During our issue, when i ran the power shell  command and after re validation of SharePoint site from CRM. we not came any such error.

  • nidnani Profile Picture
    nidnani 285 on at
    RE: Getting Authorization failure error-While trying to upload document from CRM 2016 on premise to SharePoint integrated website folders

    Hi Krish,

    I ran the command in PowerShell and got the message it is updated successfully. Then I restarted the IIS services to get the change in effect.

    But now when I got to CRM and validate the SharePoint site, I get below error. 

    Unexpected-SP-error.PNG

    <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>

  • Integration Profile Picture
    Integration 645 on at
    RE: Getting Authorization failure error-While trying to upload document from CRM 2016 on premise to SharePoint integrated website folders

    Hi,

    Execute ."ps1" available at below location, as per your CRM App installation location.

    C:\Program Files\Microsoft Dynamics CRM\tools

  • nidnani Profile Picture
    nidnani 285 on at
    RE: Getting Authorization failure error-While trying to upload document from CRM 2016 on premise to SharePoint integrated website folders

    7215.Powershell.PNG

    Hi I am getting above error in PowerShell. am I doing something wrong? 

  • Integration Profile Picture
    Integration 645 on at
    RE: Getting Authorization failure error-While trying to upload document from CRM 2016 on premise to SharePoint integrated website folders

    Hi,

    Yes Claims based certificate.

    Certificate path will be from the server or local PC, where ever you installed the certificate.

    And assigned password.

    Refer below link, if it helps.

    blogs.msdn.microsoft.com/.../

  • nidnani Profile Picture
    nidnani 285 on at
    RE: Getting Authorization failure error-While trying to upload document from CRM 2016 on premise to SharePoint integrated website folders

    Hi can you break down what certificate you referring to??

    Claim based authentication certificate? and from the above command can you please tell what needs to be replaced?

    Certificate location? Password? anything else??

  • Integration Profile Picture
    Integration 645 on at
    RE: Getting Authorization failure error-While trying to upload document from CRM 2016 on premise to SharePoint integrated website folders

    Hi,

    Password got enabled explicitly to the certificate by our Server admin, i executed below script by entering same password.

    $CertificateScriptWithCommand = “.\CertificateReconfiguration.ps1 -certificateFile c:\Personalcertfile.pfx -password personal_certfile_password -updateCrm -certificateType S2STokenIssuer -serviceAccount contoso\administrator -storeFindType FindBySubjectDistinguishedName”

    Invoke-Expression -command $CertificateScriptWithCommand

  • nidnani Profile Picture
    nidnani 285 on at
    RE: Getting Authorization failure error-While trying to upload document from CRM 2016 on premise to SharePoint integrated website folders

    Hi Krish, I am getting similar error.. Here is the thread.

    community.dynamics.com/.../authorization-failure-error-when-trying-to-upload-document-on-sharepoint-from-crm-2016 We are using Dynamic CRM 2016 On-Prem 8.1 version.

    Could you please help with this? Your code could you please elaborate? instead of Personal should I use our Certificate and its password? Also where to find password from?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans