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
Faber1975
New Contributor II

Unable to Update a GraphQLApi Definition using the Fabric management API

With Powershell code, I successfully worked out to create a GraphQLApi as described

here: https://learn.microsoft.com/en-us/rest/api/fabric/graphqlapi/items/create-graphqlapi

 

However, I am unable to update its Definition using the following API:

https://learn.microsoft.com/en-us/rest/api/fabric/graphqlapi/items/update-graphqlapi-definition

 

More, precisely, I succeed if I use a near-empty graphql-definition.json file like the following:

{ "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/graphqlApi/definition/1.0.0/schema.json" }

 

But if I try to use a real-case graphql-definition.json, got from my AzureDevops GIT (after a commit made on a hand-made GraphQL API), it fails with the following (not meaningful) response.

@{status=Failed; createdTimeUtc=07/22/2025 07:16:58; lastUpdatedTimeUtc=07/22/2025 07:16:59; percentComplete=; error=}

 

For completness, the following is the "graphql-definition.json":

{
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/graphqlApi/definition/1.0.0/schema.json",
"datasources": [
{
"connectionId": "<MY CONNECTION ID>",
"objects": [
{
"actions": {
"Query": "Enabled",
"Query_by_pk": "Enabled",
"Create": "Enabled",
"Update": "Enabled",
"Delete": "Enabled"
},
"fieldMappings": {
"A": "A",
"B": "B",
"C": "C"
},
"graphqlType": "TEST",
"relationships": [],
"sourceObject": "dbo.TEST",
"sourceObjectType": "Table"
}
],
"sourceItemId": "<MY WAREHOUSE ID>",
"sourceType": "Warehouse",
"sourceWorkspaceId": "<MY WORKSPACE ID>"
}
]
}

 

NOTE: For authenticating to the management API, I use a service principal.

 

 

6 REPLIES 6
v-agajavelly
Contributor III

Hi @Faber1975 ,

  1. Clear and Reconnect Linked Services
    Head into your workspace settings and open the Linked services section. Remove any old or cached connections tied to your Lakehouse destination. Then, re-add the Lakehouse connection make sure youโ€™re using the right authentication method (like AAD or service principal) that fits your workspace setup.
  1. Re-authenticate in Dataflow Settings
    Donโ€™t stop at just reconnecting the service. Go into your Dataflow Gen2 settings and re-enter your credentials there too. Even if the linked service looks fine, the dataflow itself might need a fresh authentication. Run a connection test to confirm everythingโ€™s working.
  1. Double-Check Permissions
    Even if youโ€™re listed as an Admin or Owner, itโ€™s worth verifying that you have explicit Write permissions on the Lakehouse. Sometimes, row-level security or workspace policies can quietly block access in ways that arenโ€™t obvious.
  1. Look for Expired Access Tokens
    If your setup uses Service Principals or Managed Identities, check in Azure AD to make sure the tokens havenโ€™t expired or been revoked. This can silently break connections and lead to unexpected CU usage.
  1. Update to the Latest Fabric Features
    Microsoft occasionally rolls out backend fixes that resolve these kinds of issues. Try re-publishing your Dataflow, or even create a new Lakehouse destination from scratch to see if the problem clears up.
  1. Try a Different User Account
    If you can, ask a teammate with similar permissions to recreate the connection and dataflow. This can help uncover tenant-level issues or consent problems tied to your account.
  1. Check Activity Logs for Hidden Errors
    Go to Fabric > Admin Portal > Activity log and look for any permission or access errors that might not show up in the Dataflow UI. These logs can reveal whatโ€™s really going on behind the scenes.

If youโ€™re still facing any issues after that, feel free to let us know and we can troubleshoot further together.

Regards,
Akhil.

Faber1975
New Contributor II

Thank you for your reply.

Unfortunately your suggestions (AI generated?) do not apply:

- I have no linked services

- I use a service account, not a user account

- Permissions are ok: I can successfully invoke the Create Graph QL API, and I can also invoke the Update GraphQL API, passing an "almost empty" payload (see my 1st message).

- The Service Principal is not expired: I use it in all other pipelines 

- In point 6 you talk about a Data flow, but I did not mention data flows (I have no data flows at all)

- I am not the admin, so I cannot access the activity logs.

 

Many thanks for your support. Fabrizio

 

 

v-agajavelly
Contributor III

Hi @Faber1975 ,

Yes the above few earlier suggestion are from copilot and in addition you can check out the below points as follows. 

This approach that might help, start with your working โ€œalmost emptyโ€ GraphQL schema and slowly add sections of your full definition back in like the types, queries, and mutations bit by bit. This lets you narrow down exactly which part of the schema is causing the update to silently fail with that {status=Failed; error=} message.

Itโ€™s also a good idea to run your full 'graphql-definition.json' through a GraphQL validator.

You can use https://graphql-validator.com or tools like 'graphql-cli 'or 'graphql-js' if you're working locally.

 

If the issue still persists try to open a support ticket https://support.fabric.microsoft.com/support/  


vagajavelly_0-1753790107308.jpeg

Regards,
Akhil. 

 

Thanks Akhil, I'll try to "dissect" the json. It must be surely syntactically correct because it is automatically generated by Fabric when I commit my API to GIT.

v-agajavelly
Contributor III

Hi @Faber1975 ,

Glad to hear youโ€™re trying that approach! Just checking back were you able to narrow it down and get the deployment working after dissecting the JSON?

Regards,
Akhil.

v-agajavelly
Contributor III

Hi @Faber1975 ,

I hope the response provided helped in resolving the issue. If the issue still persists try to open a support ticket. happy to address. 

Regards,
Akhil.

Helpful resources

Announcements
Users online (9,586)