This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
Hi,
I’ve created a Fabric Data Agent using an Ontology as the data source, and I’m encountering consistent failures even when asking simple questions related to a single entity. Queries that span or join multiple entities also fail.
Below are the details and the error output.
When I ask a basic question (even involving only one entity), the agent returns an error.
For multi-entity questions, it fails with the same pattern.
The error indicates that the generated Ontology query includes invalid aggregation or grouping logic. Specifically, a field is referenced without being part of the GROUP BY clause or wrapped in an aggregation function.
The underlying generated query seems to have a syntax or grouping issue and cannot execute.
Query Output:
Failed to execute step (RAID: 36eb1c04-9e56-4998-89ac-a9a56919482d).
Error: Failed to execute Ontology query with error:
"The query is invalid. Reason: BadRequest. Resource: Graph query (graphModelId=9231e6f0-87b9-44b4-9a36-5ddbe39b8d78).
InternalCode: 42000. Message: syntax error or access rule violation.
Cause: data exception; The identifier node_production_plant.plant_id cannot be used, as it is neither part of the GROUP BY nor an aggregation."
I have already enabled "Support GROUP BY in GQL" in the Data Agent instructions.
What I need help with:
Hi,
I was also facing a similar technical error while working with Fabric Data Agent + Ontology/Graph.
After some testing, I found that the issue in my case was related to using Graph and Ontology resources across different workspaces.
## My Setup
### Workspace A (Fabric Capacity Enabled)
> Trial capacity does not currently allow Data Agent usage.
Contains:
- Data Agent
- Graph A
- Ontology A
- Lakehouse A
- Semantic Model A
### Workspace B (Fabric Trial Capacity – Source Data Workspace)
Contains:
- Graph B
- Ontology B
- Lakehouse B
- Semantic Model B
## Observation
When I tried using Ontology/Graph resources across workspaces, I consistently faced technical errors and the Data Agent was unable to access or query properly.
However, after moving the related Graph/Ontology resources into the same workspace as the Data Agent, the issue was resolved and everything started working correctly.
Interestingly, GA (Generally Available) items such as:
- Lakehouse
- Semantic Model
- Warehouse
were still working fine across workspaces when added as AI Agent resources.
## Conclusion
Based on my testing, it looks like Fabric IQ preview items such as:
- Graph
- Ontology
may currently have limitations with cross-workspace usage.
Could you please check whether your Graph/Ontology resources are located in a different workspace from the Data Agent? If yes, try keeping them in the same workspace and test once.
This workaround resolved the issue in my case.
Hi @sadafrakshan ,if this helped you, I’d appreciate it if you could mark it as the accepted solution and give it a like 👍
This helps others in the community find the answer more easily.
Thanks!
Hi @sadafrakshan ,
The issue could be that it is not able to perform the GROUP BY using GQL. This may happen if the Graph feature is not enabled in the administration settings, so I would recommend checking that, as it could be an important point.
Since the agent is using an ontology, it relies on GQL rather than SQL, which is what it would use when querying a Lakehouse directly. As a test, you could try the same question directly against the specific Lakehouse table and compare the behavior.
From your message, I understand that the data agent itself works correctly without the ontology, and that it also works with other types of questions. Is that correct?
If this helped you solve the issue, please mark the response as accepted.
Best regards,
Check out the June 2026 Fabric update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.