cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors