Forum Discussion

AhmedShalaby's avatar
AhmedShalaby
New Member
4 months ago
Solved

Connecting to sharepoint

Hello,

I am facing a prob when I try to connect to sharepoint.

first it works fine when I connect using sharepoint.files

but when I change it to sharepoint.contents it asks me for a credentials while I have the access the the sharepoint site .
so why I am signed in but it telling me we couldn't authenticate you ? 

 



Thank you 

 

 

 

  • It's solved the owner added me as a member first he was sharing with me the site only but once I am a member it's solved thanks to everyone 

7 Replies

  • Hi AhmedShalaby , I think your credentials are cached in the datasource settings . 

    can you go to the pbi desktop -> option and setting ->Datasource settings -> delete your existing sharepoint connection .

    and try connecting to the sharepoint again 

    Thanks 

    • AhmedShalaby's avatar
      AhmedShalaby
      New Member

      Unfortunately, same prob 
      what I did :
      1- Go to data source settings 
      2- Clear permission for that particular source

      3- Edit the source credentials to my email and type as org

      4- Changed the query from sharepoint files to content.

      5- Same prob exist with content but sharepoint.files working fine 

      • Natarajan_M's avatar
        Natarajan_M
        Super User

        Hi AhmedShalaby , Can you check if you can use the web connector ? also the sharepoint you have access to read the files in it ? to check can you pick up one file from the folder and test it ?

        thanks 

  • Hi AhmedShalaby,

    Thanks for reaching fabric communnity, will happy to assist.

     

    Root Cause

    • SharePoint.Files and SharePoint.Contents authenticate separately switching between them creates a new data source entry in Power BI
    • Power BI looks for stored credentials for the new source, finds none, and throws the auth error even though you are already signed in
    • This is not a permissions issue it's a cached credentials mismatch

     

    Fix Clear & Re-authenticate

    Step 1 Clear old credentials:

    • File → Options and Settings → Data Source Settings
    • Find all SharePoint entries → click "Clear Permissions" for each
    • Click Close

    Step 2 Re-authenticate:

    • Go back to the SharePoint.Contents step in Power Query
    • When the prompt appears → select Microsoft Account (not Anonymous or Windows)
    • Click Sign In → complete login → click Connect

    Step 3 Check your URL format:

     

    Simpler Alternative Stay with SharePoint.Files

    • SharePoint.Files is more reliable and easier to work with for most use cases
    • Just point it at your root site and filter down in Power Query steps:
    = SharePoint.Files("https://yourorg.sharepoint.com/sites/YourSite", [ApiVersion = 15])​


    If Error Still Persists

    • Ensure Microsoft Account is selected not Windows or Anonymous
    • Complete any MFA prompt fully before clicking Connect
    • Confirm your account has at least Read access on the SharePoint site
    • Try opening Power BI in a different browser if the OAuth popup gets blocked

    Hope this resolves it! Mark as Accepted Solution if it helped

    • AhmedShalaby's avatar
      AhmedShalaby
      New Member

      Unfortunately, same prob 
      what I did :
      1- Go to data source settings 
      2- Clear permission for that particular source

      3- Edit the source credentials to my email and type as org

      4- Changed the query from sharepoint files to content.

      5- Same prob exist with content but sharepoint.files working fine 

  • It's solved the owner added me as a member first he was sharing with me the site only but once I am a member it's solved thanks to everyone