Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested answer

Portal integration with SharePoint online gives error: " The remote server returned an error: (401) Unauthorized."

(1) ShareShare
ReportReport
Posted on by 129

We have an online Dynamics 365 environment with portals add-on which functions as a customer serviceportal.
Our Dynamics 365 instance is succesfully connected with SharePoint Online. We use the documents integration allready in the internal facing Dynamics apps. We now want to use it to present important files to our customers on the portal.

I'have set up the Portal-SharePoint integration according the explainatory from Microsoft Docs (https://docs.microsoft.com/nl-nl/powerapps/maker/portals/manage-sharepoint-documents). I have performed all the steps and settings, also the permissions related stuff. We have set it up for the Account entity.

Here the error, when in the portal (as you can see the buttons for new folder and upload are visible):

pastedimage1585305478677v1.png

This is the form with the documents subgrid:

pastedimage1585305555244v2.png

This is the entityform in Portals admin:

pastedimage1585305625644v3.png

Entity permissions in Portals admin:

 Parent entity account

pastedimage1585305697371v4.png

Child entity Document locations:

pastedimage1585305765441v5.png

Does anyone know why this is still not working? Sorry that the screenshots are in Dutch.

Thanks in advance

Categories:
  • zl0903 Profile Picture
    5 on at
    RE: Portal integration with SharePoint online gives error: " The remote server returned an error: (401) Unauthorized."

    hi! Brother, I wonder if you solved the problem

  • Suggested answer
    KvRoploo Profile Picture
    129 on at
    RE: Portal integration with SharePoint online gives error: " The remote server returned an error: (401) Unauthorized."

    Reaching out to Microsoft Support has positively worked out. The problem was a broken API connection between SharePoint and Dynamics Portals. Restarting the integration from within the Dynamics 365 Portal-admin page gave the desired results. Hereby my problem is solved.

    Thank you all for the offered help.

  • KvRoploo Profile Picture
    129 on at
    RE: Portal integration with SharePoint online gives error: " The remote server returned an error: (401) Unauthorized."

    Hello Saurabh and Alex, thank you for your reply's

    I'm very shure I performed the second step on the correct way, I did give consent on the permissions. I am Tenant administrator and also administrator in Azure and Dynamics 365. I have all the permissions needed.

    I have reached out to Microsoft to raise a ticket. It is under investigation at the moment. Suggestions are always welcome.

  • saurabhtiwarii Profile Picture
    1,110 on at
    RE: Portal integration with SharePoint online gives error: " The remote server returned an error: (401) Unauthorized."

    Hello,

    Thanks for reaching Dynamics community. The problem might be appearing due to insufficient permissions for the user account who performed this integration with the portals site.

    pastedimage1585380609951v1.png

    Please check if the user account owns the Portals app registration on Azure AD, also ensure that he user is not a guest on the Azure tenant where Dynamics 365/Sharepoint services belong. 

    https://docs.microsoft.com/en-us/dynamics365/portals/manage-portal#to-add-yourself-as-an-owner-of-the-azure-ad-application

    If these do not help, try to capture F12 HTTP/Network traces while reproducing this issue in order to understand what was the response served from the end server on this unauthorized request. The HTTP response might give you some more details regarding this unauthorized request.

    Please mark my comment as answered if these help. 

    Thanks,

    Saurabh

  • Alejandro Serdan Profile Picture
    355 on at
    RE: Portal integration with SharePoint online gives error: " The remote server returned an error: (401) Unauthorized."

    Hi !!!

    This error is not related to entity permissions but the service-side authentication between SharePoint Server and Dynamics Portals.

    The issue looks to be in step 2 of the documentation or

    The authorization in step 3 "Permissions requested Accept for your organization" or

    The permissions in SharePoint of the user you used to setup the synchronization.

    If these steps were followed, please help us creating an incident to take a deep look of the problem and fix it.

    Regards.

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

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,860 Test role Public

#2
Ludwig Reinhard Profile Picture

Ludwig Reinhard 229,831 Microsoft Employee

#3
Martin Dráb Profile Picture

Martin Dráb 225,155 Moderator

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans