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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
saimanjiri
New Contributor II

Fabric SQL database is stopped working while calling from WebApi

Hello, 

We are calling Fabric SQL db from webapi through Managed Identity. It was working till yesterday without issue, suddenly started throwing below error from yesterday afternoon. We havent made any changes, what could be the reason? Please assist

 

saimanjiri_0-1752002584226.png

 

1 ACCEPTED SOLUTION
v-sgandrathi
Honored Contributor II

Hi @saimanjiri,

Thank you for reaching out.
The error indicates that the managed identity your Web API uses may no longer have the necessary permissions to access the Fabric SQL database. This can happen due to expired tokens, permission changes, or updates in Azure AD or resource settings, even if you didn't make any changes.

Please check if the managed identity still exists as a database user by running: SELECT * FROM sys.database_principals WHERE name = '<YourManagedIdentityName>'. If it's missing, recreate it with: CREATE USER [<ManagedIdentityName>] FROM EXTERNAL PROVIDER; and assign roles like db_datareader and db_datawriter. Also, make sure your Web API is still set to use Managed Identity in the connection string. If the problem continues, please provide the identity name and error timestamp for further investigation.

 

Thank you and continue using Microsoft Fabric Community Forum.

View solution in original post

7 REPLIES 7
saimanjiri
New Contributor II

Hello, 

We are calling Fabric SQL db from webapi through Managed Identity. It was working till yesterday without issue, suddenly started throwing below error from yesterday afternoon. We havent made any changes, what could be the reason? Please assist

 

saimanjiri_0-1752002676259.png

 

v-sgandrathi
Honored Contributor II

Hi @saimanjiri,

Thank you for reaching out.
The error indicates that the managed identity your Web API uses may no longer have the necessary permissions to access the Fabric SQL database. This can happen due to expired tokens, permission changes, or updates in Azure AD or resource settings, even if you didn't make any changes.

Please check if the managed identity still exists as a database user by running: SELECT * FROM sys.database_principals WHERE name = '<YourManagedIdentityName>'. If it's missing, recreate it with: CREATE USER [<ManagedIdentityName>] FROM EXTERNAL PROVIDER; and assign roles like db_datareader and db_datawriter. Also, make sure your Web API is still set to use Managed Identity in the connection string. If the problem continues, please provide the identity name and error timestamp for further investigation.

 

Thank you and continue using Microsoft Fabric Community Forum.

v-sgandrathi
Honored Contributor II

Hi @saimanjiri,

 

We wanted to follow up since we haven't heard back from you regarding our last response. We hope your issue has been resolved.

 

Thank you.

v-sgandrathi
Honored Contributor II

Hi @saimanjiri,

 

Just checking in -- have you had a chance to review and try the provided solution? Kindly share the status whenever you get a chance.

 

Looking forward to your response.

v-sgandrathi
Honored Contributor II

Hi @saimanjiri,

 

.Just a quick check-in! Has your issue been resolved with the information we shared? We’d be delighted to help further if needed.

 

Thank you.

Issue has been resolved after changing the sensitivity label from confidential to General

@saimanjiri  We had similar issue now and is there any reason we need to change sensitivity? IN our case we cannot change to General (even though it worked) due to securoty reasons

Helpful resources

Announcements
Top Solution Authors
Top Kudoed Authors
Users online (10,586)