Forum Discussion

amt1907's avatar
amt1907
New Member
9 months ago
Solved

Microsoft Entra ID Error

Getting this error while Publishing the data on lakehouse.
Already taken over the lakehouse, workflows. still getting this error: Unable to create a table on the Lakehouse SQL catalog due to metadata refresh failure, for Lakehouse Id: **** and Batch Id: ****** underlying error Unable to create a table. Underlying Error: '[code=AdalRetryException,subCode=0,message=Couldn’t run query. There is a problem with the Microsoft Entra ID token. Have the warehouse owner log in again. If they’re unavailable, use the takeover feature. 

 I am the admin of the workspace, still getting the error. Kindly help in the resolution.

  • amt1907's avatar
    amt1907
    9 months ago
    SOLUTION: Go to Microsoft Fabric > One Lake Catalog > Select Workspace > Select Type as Lakehouse and Warehouse> Search Staging > Now Open the files for which you are not the owner then in the URL https://app.powerbi.com/groups/eWORKSPACE ID/lakehouses/LAKEHOUSE or WAREHOUSE ID?experience=power-bi. Now Open Power Shell as Administrator and run this: Install-Module -Name MicrosoftPowerBIMgmt Import-Module MicrosoftPowerBIMgmt Import-Module MicrosoftPowerBIMgmt Install-Module -Name MicrosoftPowerBIMgmt Connect-PowerBIServiceAccount $workspaceID = '' $warehouseid = '' #Invoke warehouse takeover $url = 'groups/' + $workspaceID + '/datawarehouses/' + $warehouseid + '/takeover' Invoke-PowerBIRestMethod -Url $url -Method Post -Body "" (After this double Click) Now you have became the owner of that lakehouse or warehouse. Do this for all the other staging files for which you are not the owner. IF still it not works, then raise a microsof ticket and connect with customer support agent., Thanks!

11 Replies

  • Hi amt1907,

     

    The owner of the lakehouse left or changes its permissions, it may cause the problem.

     

     

    1) Re-authenticate the Lakehouse SQL endpoint

    • Go to the Lakehouse in the Fabric workspace.

    • In the ribbon, open the “SQL endpoint” view.

    • Click “Manage permissions” or “Take ownership” (if available).

    • Once you’ve taken ownership, refresh the page and try the publish operation again.

     

    2) Confirm you have the correct Lakehouse role and there is not restriction on the security roles on lakehouse

    • Open the Lakehouse → Settings → Permissions

    • Ensure your account (or the service principal you’re using) has “Lakehouse Admin” or “Contributor” role — not just Workspace Admin.

     

    Hope it can help you !

    Best regards,

    Antoine

     

     

     

    • FabScone75's avatar
      FabScone75
      Helper I
      • Open the Lakehouse → Settings → Permissions 

      I don't see these permissions option on my lakehouse settings button. 

  • v-hjannapu's avatar
    v-hjannapu
    Community Support

    Hello amt1907,
    Thank you for posting your query in Microsoft Fabric Community Forum.

    This error usually comes up when the Microsoft Entra ID token is not valid anymore or still linked to the old owner. Even if you have already taken over the Lakehouse and workflows, the token might not have refreshed properly.

    Please try these steps once: Sign out from Fabric and sign in again to refresh your token.Open the Lakehouse directly and check if it’s loading fine then try publishing the data again.

    If the problem still continues, please share if there were any recent changes like ownership transfer or permission updates in the workspace.

     

    please go through with the below document hope it may resolve your Issue
    https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-api

    Hope this helps if you have any queries we are  happy to assist you further.
    Best Regards,
    Community Support Team.

  • Still not working. There is no changes...till 22nd oct its working but after that not working.
  • Still not working. There is no changes...till 22nd oct its working but after that not working.
      • v-hjannapu's avatar
        v-hjannapu
        Community Support

        Hi amt1907,

        Could you please confirm if the issue has been resolved after raising a support case? If a solution has been found, it would be greatly appreciated if you could share your insights with the community. This would be helpful for other members who may encounter similar issues.

        Regards,
        Community Support Team.

  • Hello, I wanted to update this issue with a potential solution. We had a scenario where we had a staging warehouse that was created that was owned by someone who had left the organisation. I had to find the warehouse and take ownership. 

    The error message I had was:

    dimactivities: Error Code: Mashup Exception Data Source Error, Error Details: Couldn't refresh the entity because of an issue with the mashup document MashupException.Error: DataSource.Error: Microsoft SQL: Internal system error (0xa(MWC service error: Server responded with error: 400)(AdalRetryException: There is a problem with the Microsoft Entra ID token. Have the warehouse owner log in again. If they're unavailable, use the takeover feature.)) when attempting to open or create remotely stored delta log file. This error is usually intermittent. Please try the operation again and contact Customer Support Services if this persists. Statement ID: {xxxxxxxxxxxxxxxx} Details: Reason = DataSource.Error;ErrorCode = 10478;DataSourceKind = Lakehouse;DataSourcePath = LakehouseModelStorage;DataSourceKind.2 = SQL;DataSourcePath.2 =xxxxxxxxxxxxxxxxxxxx.datawarehouse.fabric.microsoft.com;StagingWarehouseForDataflows_20250904084952;Message = Internal system error (0xa(MWC service error: Server responded with error: 400)(AdalRetryException: There is a problem with the Microsoft Entra ID token. Have the warehouse owner log in again. If they're unavailable, use the takeover feature.)) when attempting to open or create remotely stored delta log file. This error is usually intermittent. Please try the operation again and contact Customer Support Services if this persists. 

     

    You will see the bold part above which references the staging warehouse. I had to find this warehouse, and once I found it, take ownership. Once I owned the warehouse, I found that my dataflow ran without the error. 

    For guidance on taking ownership, see here:
    Change Ownership of a Warehouse - Microsoft Fabric | Microsoft Learn

    • amt1907's avatar
      amt1907
      New Member
      SOLUTION: Go to Microsoft Fabric > One Lake Catalog > Select Workspace > Select Type as Lakehouse and Warehouse> Search Staging > Now Open the files for which you are not the owner then in the URL https://app.powerbi.com/groups/eWORKSPACE ID/lakehouses/LAKEHOUSE or WAREHOUSE ID?experience=power-bi. Now Open Power Shell as Administrator and run this: Install-Module -Name MicrosoftPowerBIMgmt Import-Module MicrosoftPowerBIMgmt Import-Module MicrosoftPowerBIMgmt Install-Module -Name MicrosoftPowerBIMgmt Connect-PowerBIServiceAccount $workspaceID = '' $warehouseid = '' #Invoke warehouse takeover $url = 'groups/' + $workspaceID + '/datawarehouses/' + $warehouseid + '/takeover' Invoke-PowerBIRestMethod -Url $url -Method Post -Body "" (After this double Click) Now you have became the owner of that lakehouse or warehouse. Do this for all the other staging files for which you are not the owner. IF still it not works, then raise a microsof ticket and connect with customer support agent., Thanks!