Forum Discussion
Semantic Model Refresh using Service principal issue
We are trying to set up a service principal for semantic model refresh. We have created the service principal ID, a security group, and added the service principal to all the required workspaces.
However, when we try to create a new connection for the semantic model to the Gold Fabric Warehouse using the service principal, we encounter the following error:
“Unable to create connection for the following reason: It looks like the refresh token expired. Please go to this dataset’s settings page and re-enter the credentials for the data source.”
Are we missing something in the setup?
Specifically, what value should be provided in the Service Principal ID field?
Could someone help me understand the correct way to configure this? I am new to Fabric and currently managing Fabric on my own in the organization. We do have a tenant admin who has already created the service principal.
Thanks Zanqueta I changed the Service principal id as Client ID and i made sure
- Confirm the Service principal ID is the Application (client) ID.
- Generate a Client Secret in Azure AD:
- Go to App registrations → Your App → Certificates & Secrets → New client secret.
- Copy the value and enter it in the Service principal key field.
- Ensure permissions:
- Add Power BI Service API permissions (e.g., Tenant.ReadWrite.All) and grant Admin consent.
- In Fabric:
- Enable service principals in tenant settings.
- Add the service principal to the workspace with Admin or Member rights.
still the same issue persists
4 Replies
- JibinSebastianAdvocate II
azruld I saw that semantic model issue happend to you. Could you please help me to setup the serivce principal and semantic model refresh
- JibinSebastianAdvocate II
After providing the client id it worked thank you so much Zanqueta
- ZanquetaSuper User
Hi JibinSebastian,
Service principal ID is the Application (client) ID, and the Service principal key is the Client Secret. Without these, authentication fails and triggers the error.The error occurs because the service principal credentials are incomplete or misconfigured. In the New Connection form:- Tenant ID: This should be your organisation’s Azure AD directory ID.
- Service principal ID: This must be the Application (client) ID of the registered app in Azure AD (not the Object ID).
- Service principal key: This is the Client Secret generated for the app in Azure AD.
The message about the refresh token usually means:- The client secret is missing or incorrect.
- The service principal does not have the required permissions.
- Admin consent for API permissions has not been granted.
Steps to Fix
- Confirm the Service principal ID is the Application (client) ID.
- Generate a Client Secret in Azure AD:
- Go to App registrations → Your App → Certificates & Secrets → New client secret.
- Copy the value and enter it in the Service principal key field.
- Ensure permissions:
- Add Power BI Service API permissions (e.g., Tenant.ReadWrite.All) and grant Admin consent.
- In Fabric:
- Enable service principals in tenant settings.
- Add the service principal to the workspace with Admin or Member rights.
Official Documentation
https://learn.microsoft.com/en-us/fabric/security/service-principal
If this response was helpful in any way, I’d gladly accept a 👍much like the joy of seeing a DAX measure work first time without needing another FILTER.
Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop 🌀.
- JibinSebastianAdvocate II
Thanks Zanqueta I changed the Service principal id as Client ID and i made sure
- Confirm the Service principal ID is the Application (client) ID.
- Generate a Client Secret in Azure AD:
- Go to App registrations → Your App → Certificates & Secrets → New client secret.
- Copy the value and enter it in the Service principal key field.
- Ensure permissions:
- Add Power BI Service API permissions (e.g., Tenant.ReadWrite.All) and grant Admin consent.
- In Fabric:
- Enable service principals in tenant settings.
- Add the service principal to the workspace with Admin or Member rights.
still the same issue persists