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 :
Power Platform Community / Forums / Power Automate / Read file from sharepo...
Power Automate
Unanswered

Read file from sharepoint shared folder

(1) ShareShare
ReportReport
Posted on by 2
Good morning. I've been looking for how I can read a file from a shared sharepoint in Power Automate, but I am unable to read the file.
This sharepoint is on a different tenant, so I have read and edit permissions on this site. I still get unauthorized, do I have to have a PA account on that tenant, or is there a way to read it? Thanks in advance
Categories:
I have the same question (0)
  • Verified answer
    VASANTH KUMAR BALMADI Profile Picture
    266 on at
    Read file from sharepoint shared folder
    Hi,

    Since the SharePoint site you're trying to access is in a different tenant, you do need to authenticate correctly across tenant boundaries.

    Here’s what you can do:

    1. Use a Connection with Cross-Tenant Permissions

    In Power Automate, when you need to access a SharePoint site in a different tenant, the connection you use to authenticate needs to have proper permissions. If you're getting an "unauthorized" error, it might be because the connection is only valid within your tenant.

    • Solution: You need to authenticate using an account that has access to the external tenant’s SharePoint site. Typically, this would be the owner or a user with permission in that SharePoint site.

      • Create a new connection using the "SharePoint" connector.
      • When you authenticate, make sure to log in with an account from the external tenant that has the necessary permissions (read/edit permissions in the external SharePoint site).
      • You do not need to have a Power Automate (PA) account in that tenant, just an account that can access the SharePoint site.

    2. Use a Service Principal or Azure AD App (for Advanced Scenarios)

    If you're working with automated flows and need to set up cross-tenant access programmatically, using an Azure AD app (service principal) can be a solution.

    • Solution: Set up an Azure AD app in the external tenant and grant it the necessary permissions to access SharePoint files. This method involves more setup, but it allows for seamless integration between tenants.

    3. Workaround Using External Sharing

    If you're encountering issues even with proper access, check that the external SharePoint site allows external sharing or guest access. Sometimes, SharePoint sites restrict access to users outside their tenant.

    Steps for Direct Access:

    1. Go to Power Automate > Data > Connections.
    2. Create a new SharePoint connection.
    3. Choose the account that has access to the external SharePoint site.
    4. Ensure you are using the correct SharePoint site URL for the external tenant.

    Key Considerations:

    • Make sure your account is granted permission specifically on the SharePoint site in the external tenant.
    • Check with the SharePoint admin if there are any restrictions on accessing the site from outside the tenant.
    • When using a service principal, you may need admin consent to allow cross-tenant authentication.
    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!
  • Verified answer
    saimanojakula97 Profile Picture
    10 on at
    Read file from sharepoint shared folder
    Configure Cross-Tenant Access in Microsoft Entra ID
    1. Enable Organizational Access:
      • In the source tenant (where the SharePoint site resides), configure cross-tenant access to allow users or service accounts from the target tenant (where Power Automate resides).
    Steps:
      • Go to Microsoft Entra Admin Center.
      • Navigate to External Identities > Cross-Tenant Access Settings > Organizational Settings.
      • Add the target tenant's Azure AD ID.
      • Define access policies for the users or service accounts (e.g., "Allow Access to SharePoint").
    1. Trust External Authentication:
      • Enable mutual MFA trust or device compliance policies for added security.

    2. Share the SharePoint Library
    • Share the library or folder in the source tenant with the specific user or service account in the target tenant.
    • Use "Contribute" or "Edit" permissions, depending on the requirements of your Power Automate flow.

    3. Set Up Power Automate
    1. Create SharePoint Connections:
      • In Power Automate, add a SharePoint connection using the external user or service account credentials that now have access to the library.
    2. Build the Flow:
      • Use SharePoint actions in Power Automate:
        • For example: "Get files (properties only)", "Get file content", and "Create file".
      • Use the full URL of the SharePoint library in the source tenant.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard