Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
MisterFry
Resolver III
Resolver III

Unable to create connections to Sharepoint: Microsoft.IdentityModel.Tokens.AudienceUriValidationFail

When I try to connect in the web service to pull the files into a datamart, I get an error:
Exception of type 'Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException' was thrown.
this SUGGESTS that I'm missing some kind of permissions to create the connection to sharepoint.
 
In this case, I am the owner of the Sharepoint folder.
 
My user is able to access the Sharepoint folder.
 
I am also experiencing issues in the desktop version that might be similar. (Desktop Version: 2.107.841.0 64-bit (July 2022)) I used to be able to create connections to sharepoint via the sharepoint folders connection type. I am no longer able to do this. I get an error that I can't be authenticated with the provided credentials. 
 
Further weirdness is that EXISTING connections to sharepoint folders that I've created in the past continue to work. 
I can also copy the connection information out of an existing sharepoint connection, and repurpose the query, and it works. This is an interesting workaround, but doesn't solve my issue as I need to read this data into a dataflow, or a datamart on the server. 
 
Possibly related, I CAN access it via the office365.runtime.auth.authenticationContext in Python.

 

from office365.runtime.auth.authentication_context import AuthenticationContext
from office365.sharepoint.client_context import ClientContext
from office365.sharepoint.files.file import File
from openpyxl import load_workbook

url = "https://<org>.sharepoint.com/sites/<site>/"
ctx_auth = AuthenticationContext(url)
ctx_auth.acquire_token_for_user(<secret>, <secret>)
ctx = ClientContext(url, ctx_auth)
response = File.open_binary(ctx, "/sites/<site>/<file>")​

 

1 ACCEPTED SOLUTION
MisterFry
Resolver III
Resolver III

The issue is that the Sharepoint site requires the https:// at the beginning of the hostname. 

View solution in original post

2 REPLIES 2
MisterFry
Resolver III
Resolver III

The issue is that the Sharepoint site requires the https:// at the beginning of the hostname. 

lbendlin
Super User
Super User

I used to be able to create connections to sharepoint via the sharepoint folders connection type. I am no longer able to do this. I get an error that I can't be authenticated with the provided credentials. 

Go to Global Data Source Settings and remove all Sharepoint entries.  Then re-authenticate in your query.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.