Accessing SharePoint List Across Different Microsoft Teams

COLSTON, Christopher 40 Reputation points
2024-12-05T14:14:07.2466667+00:00

How can access to a SharePoint list created under Microsoft Teams X be granted for usage on a SharePoint site page under Microsoft Teams Y? I have configured the web parts and set the appropriate permissions to give co-ownership to Microsoft Teams Y, but the list does not appear as either a list or a source connection.
User's image

User's image

I know embedding via iframe is an option, but it is not the solution sought. Is there a configuration issue, or is this functionality simply not possible?

Appreciate any help.

Microsoft 365 and Office | SharePoint | For business | Windows
{count} votes

Answer accepted by question author
  1. Ling Zhou_MSFT 23,670 Reputation points Microsoft External Staff
    2024-12-10T05:29:59.43+00:00

    Hi @COLSTON, Christopher,

    Hope everything is going well.

    I would like to sincerely apologize for the delay, as my testing environment suddenly crashed.

    1. Select a customized view when embedding a list.
      • Navigate to the list you would like to embed and select your customized view.
      • At the top URL you will find the viewid parameter added after it to indicate which view you have selected. User's image
      • Copy the URL with the viewid parameter and populate it with the embed web part.
    2. Remove the toolbar at the top of the list.
      • The embed web part is only used to embed the page, for the top toolbar in the list is following the embedded page, there is no way for the embed web part to add custom scripts.
      • In addition, to protect your property, SharePoint no longer allows us to run custom scripts on pages anymore. This can easily lead to script injection hazards. SharePoint cannot recognize what scripts are inserted, where they are inserted and who inserted them. If a dangerous or malicious script is inserted, the only way you can stop it is to delete the page hosting it. This can lead to data loss.

    If there is anything else we can do for you, please feel free to contact us.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. It will be beneficial to more community members reading here. Your contribution will be highly appreciated.


1 additional answer

Sort by: Most helpful
  1. Ling Zhou_MSFT 23,670 Reputation points Microsoft External Staff
    2024-12-06T06:11:48.7466667+00:00

    Hi @COLSTON, Christopher,

    Hope everything is going well.

    First, make sure that your Microsoft Teams X and Microsoft Teams Y are in the same tenant.

    If they are not in the same tenant, then there is no harm in cross-tenanting to display the lists from the site X to the pages in the site Y. We have tested this and either way it returns a 401 error.

    User's image

    If it is the same tenant, then we can use the embed web part to display the lists from site X to a page in site Y.

    Here’s how you can proceed:

    1.Grant Access to Users in site X

    It is important to make sure that all of your users in Site Y have access to the list in Site X. This is a critical part of ensuring that the listings are displayed properly.

    We know that you have set up the appropriate permissions and are just reminding you to check them further.

    2.Get the List URL:

    • Go to the list in site X.
    • Copy the URL of the list from the browser's address bar. It must be a full address like this: https://xxx.sharepoint.com/sites/xxx/Lists/xxxx/AllItems.aspx

    3.Embed the List in site Y:

    • In site Y, navigate to the page where you want to display the list.
    • Click on Edit to modify the page.
    • Click on the "+" (Add a web part) button.
    • Select the Embed web part.
    • In the Embed web part, paste the URL of the list from site X or use <iframe> tag.
        #Enter the URL directly
        https://xxx.sharepoint.com/sites/xxx/Lists/xxx/AllItems.aspx
        
        #Or use <iframe> tag 
        <iframe src="https://xxxx.sharepoint.com/sites/xxx/Lists/xxx/AllItems.aspx" width="600" height="400"></iframe>
        
      
    • Save and publish the page.

    4.Verify Access and Display:

    • Ensure that users in site Y can access the list by navigating to the page and checking if the list is displayed correctly.

    I have tested this method, and it works.

    User's image

    Also, the reason about List web part not being able to search for lists from other sites is that it only shows lists from this site. This is the default design of SharePoint.

    If you have any questions, please do not hesitate to contact me.

    Moreover, if the issue can be fixed successfully, please click "Accept Answer" so that we can better archive the case and the other community members who are suffering the same issue can benefit from it.

    Your kind contribution is much appreciated.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.