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 : bN6i7MfE8IMr9OwYzKxGMZ
Power Apps - Microsoft Dataverse
Answered

Sharepoint documents integration breaks after importing managed solution

Like (0) ShareShare
ReportReport
Posted on 14 Jun 2023 20:14:55 by 595

In our production environment, we have enabled Sharepoint document integration for a few entities (accounts, contacts,...).

It happened now twice (yesterday and today) that after importing a managed solution (through Power Platform Pipelines), the document integration for the Contacts table was disabled (other tables had it still enabled). When I tried (after the first time) to re-enable it, I got an error:

 

<errorlog><sites>
 <site>
 <url>https://xxxxxxxxxx.sharepoint.com/sites/xxxx</url>
 <exception>The remote server returned an error: (401) Unauthorized.</exception>
 <errorcode>-2147088204</errorcode>
 <correlation>2bcb2b37-276e-4dfe-9b11-e75b90f10583</correlation>
 </site>
</sites></errorlog>

 

I am a full (global) admin with all rights in the environment and sharepoint...

The next morning, I tried it again, and no error came up and I could re-enable it without any problem.

Then, later today, we imported a new version of the same managed solution (also through Pipelines), and the sharepoint integration was disabled again, again only for the Contacts table. Until now, when trying to re-enable it, I get the same error message again... Hopefully, tomorrow morning I can (magicaly) re-enable it again...

 

Does anyone knows why it is disabled in the first place, and why I get a (temporary) error message when trying to reenable it... ?

 

Up until yesterday, we did not have this issue; but up until then, we used the manual process (export from DEV and import to PROD using a solution zip file) instead of pipelines... Is there difference in both methods that could cause this behaviour?

Categories:
I have the same question (0)
  • Parvez Ghumra Profile Picture
    1,579 Moderator on 09 Oct 2023 at 23:11:35
    Re: Sharepoint documents integration breaks after importing managed solution

    @MinotaurGB In your development environment, ensure that your solution has included the table including the table metadata. You may need to temporarily remove the table from the solution and then re-add it again with this option selected, just to make sure. Then when you export that solution as managed and import it into your target environment, the change made to the table metadata should take effect in the managed layer.

  • MinotaurGB Profile Picture
    8 on 09 Oct 2023 at 14:12:51
    Re: Sharepoint documents integration breaks after importing managed solution

    @parvezghumra Hi, sorry hijack and raise an old thread.  We have hit the same issue with enabling document management manually and this action creating an unmanaged layer.  How do you edit the Entity Metadata via  PowerApps ?  I have tried enabling document management via the legacy Dynamics interface on the entity but it still creates an unmanaged layer.

  • MinotaurGB Profile Picture
    8 on 28 Sep 2023 at 12:47:58
    Re: Sharepoint documents integration breaks after importing managed solution

    Hi, sorry hijack and raise an old thread.  We have hit the same issue with enabling document management manually and this action creating an unmanaged layer.  How do you edit the Entity Metadata via  PowerApps ?  I am struggling to see any entity metadata to edit.  Any help is appreciated.

  • Parvez Ghumra Profile Picture
    1,579 Moderator on 15 Jun 2023 at 09:05:06
    Re: Sharepoint documents integration breaks after importing managed solution

    @KoenJanssensPD

    In regards to the in-app pipelines not behaving as per Microsoft docs, I would suggest raising a support request with them.

    The flag for enabling document management at the table metadata level is the only solution-aware component of the Out of the Box SharePoint integration. The actual provisioning of SharePoint sites, enabling the actual integration between your Dataverse environment and SharePoint, etc is not something that is solution-aware. This means the settings associated with this are not transferred between environment as part of a solution export/import process. Therefore, this part of the setup need to be handled manually as a one-off infrastructure provisioning exercise. One of the benefits of this is that it gives you total control over which Dataverse environments are connected to which SharePoint sites and you can configure a separate SharePoint site for each Dataverse environment (which I agree should be the preferred option), or you can use the same SharePoint site for multiple Dataverse environments. Furthermore, the enabling of the Out of the Box SharePoint integration is optional - so you can enable document management at the table metadata level in an environment, without enabling SharePoint integration

    Glad you're able to re-enable document management again without error. I'd suggest raising this in your support request with Microsoft too 🙂

  • KoJaPD Profile Picture
    595 on 15 Jun 2023 at 07:31:38
    Re: Sharepoint documents integration breaks after importing managed solution

    Hi @parvezghumra 

     

    You are right that the managed solution was imported with "overwrite customizations" enabled when it was done through the pipelines.

    However, the documentation for pipelines states

    Can I specify advanced solution import behaviors such as update versus upgrade?
    Not currently. Pipelines default import behavior is Upgrade with Maintain customizations.

    Before, when we were using manual solution export/import, "overwrite customizations" was disabled...

     

    Secondly, I would like to avoid to have to enable document management in the development environment, since that means I have to setup a whole separate (development) sharepoint site. And I wonder if I would configure this in DEV, would PROD use that same (development) sharepoint site as well for the document management? That is not desirable, certainly not when importing this solution in another tenant where that sharepoint site is not accessible...

    Or is there any way to configure it variable (with environment variables?) so that each environment uses its own dedicated sharepoint site somehow?

     

    Thirdly: "magically", this morning, I was able to re-enable the document management for the Contacts table again without any error...

     

  • Verified answer
    Parvez Ghumra Profile Picture
    1,579 Moderator on 14 Jun 2023 at 21:45:05
    Re: Sharepoint documents integration breaks after importing managed solution

    Hi @KoenJanssensPD ,

     

    I'm not sure about the (temporary) error. However, from the symptoms you're describing, my guess is that these are caused by the combination of the following issues:

     

    1. You are enabling document management in your Production environment on the entities you list directly manually? This means you are making table metadata changes in the unmanaged layer on such tables. You can double check this by checking the solution layers on the tables in question before and after making this change. Look for the presence of the unmanaged layer and the property values changed within it.

    2. In your source development environment, out of the tables you have listed, table metadata is only included in your solution for the Contact table. For the other tables on which you're trying to enable document management, the table metadata is not included in the solution. You can verify this by choosing to add an existing sub-component to each of the tables and in the dialog, check whether the 'Include table metadata' checkbox is ticked. If it isn't, tick it and complete the process of adding the sub-component to the solution. You can remove the sub-component from the solution afterwards.

    3. When you deploy your solution from your source development environment to your Production environment, you're installing it in a managed state, using the option to 'overwrite unmanaged customizations'. You should be able to verify this by checking the solution import history in https://make.powerapps.com. If you select the latest entry for your solution, in the right hand pane that pops up, you can check the advanced properties to verify whether this option was selected. I don't know whether the standard pipelines allow you to configure such options.

     

    My recommendation would be to enable document management on the necessary tables in your source development environment, and include table metadata for such tables in your solution. This will enable you to deploy these changes in a managed state in your non-development environments and negate the need to apply them manually in non-development environments in the unmanaged layer.

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…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Featured topics

Loading complete