Forum Discussion
Download cypher results
- 1 month ago
Hi psrihitha ,
Could you please check below :
- Make sure the label used in your query exactly matches the node type defined in the Graph model (labels are case-sensitive). Try listing the available node types or inspect the Graph model in the Fabric UI to confirm the label name.
- Does the identical Cypher/GQL query return results in the Fabric Graph Query Editor? If it fails there as well, the issue is likely with the query or label rather than the REST API.
- Although the service principal has Graph permissions, verify that it also has access to the underlying Graph model and its secured node types.The error specifically mentions security configuration enforcement, which can occur if the identity is restricted from accessing certain node labels.
- If the query works in the UI but fails through the REST API using the service principal, it may indicate a permission difference between your user identity and the service principal.
Thanks!!
- 1 month ago
Hi psrihitha ,
If the query works only after granting Admin access, it indicates a permission issue. You can try granting only the minimum required permissions instead of Admin.
Thanks!!
Hi psrihitha ,
Thank you for reaching out to fabric community.
At present, the Graph Code Editor/Query Builder doesn't provide an option to Download, Export, Save as CSV, or Copy all results from the result pane. The UI is intended for interactive exploration, viewing results as a Diagram, Card, or Table, and for saving the query as a queryset.
Reference documentation for limitation : https://learn.microsoft.com/en-us/fabric/graph/limitations#data-export-and-visualization
If you need the complete result set, please try the below approach
- Call the Graph Query REST API from a Python notebook using an authenticated HTTP request.
- Parse the returned JSON.
- Write the results to a file using pandas or Spark.
The Graph Query API documentation provides the request format and endpoint needed to execute GQL queries programmatically : https://learn.microsoft.com/en-us/fabric/graph/gql-query-api
Thanks!!
- psrihitha1 month agoFrequent Visitor
Hi v-sathmakuri
I have tried this approach
Call Graph Query REST API from a Python notebook using an authenticated HTTP request.But facing this issue My service principal has full access to graph but then I'm facing this issue .
API that i hit : POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/GraphModels/{GraphModelId}/executeQuery?preview=true
Error response:{ "status": { "code": "42000", "description": "error: syntax error or access rule violation", "diagnostics": { "OPERATION": "query", "OPERATION_CODE": "0", "CURRENT_SCHEMA": "/" }, "cause": { "code": "22000", "description": "error: data exception; The label expression (%) does not match any node type in the graph, or you don't have access to any matching node types due to security configuration enforcement.", "diagnostics": { "OPERATION": "query", "OPERATION_CODE": "0", "CURRENT_SCHEMA": "/" } } } }
Could you please help me resolve this- v-sathmakuri1 month agoCommunity Support
Hi psrihitha ,
Could you please check below :
- Make sure the label used in your query exactly matches the node type defined in the Graph model (labels are case-sensitive). Try listing the available node types or inspect the Graph model in the Fabric UI to confirm the label name.
- Does the identical Cypher/GQL query return results in the Fabric Graph Query Editor? If it fails there as well, the issue is likely with the query or label rather than the REST API.
- Although the service principal has Graph permissions, verify that it also has access to the underlying Graph model and its secured node types.The error specifically mentions security configuration enforcement, which can occur if the identity is restricted from accessing certain node labels.
- If the query works in the UI but fails through the REST API using the service principal, it may indicate a permission difference between your user identity and the service principal.
Thanks!!
- psrihitha1 month agoFrequent Visitor
v-sathmakuri After giving the admin access I was able to query.Do we have any other alternative to this rather working with admin access