AIP Logic can't use Ontology types backed by Restricted Views with Project-scoped execution?

I am trying to create an AIP Logic to create an AI Agent that uses the Ontology SQL tool. It currently uses an object that is backed by a Restricted View and we were using the User-scoped execution that comes by default. Everything works great.

However, it’s important that other users also have access to the logs, so we would like to change it to Project-scoped execution. But, when we try to do this we get errors:

  • If you try to Preview it shows: “Publish errors: Unable to create scoped token”
  • If you try to Publish the function it shows:
Failed to publish: {"type":"STATUS","status":500,"body":{"errorCode":"INTERNAL","errorName":"Default:Internal","errorInstanceId":"a6d86274-1b0b-4597-a92e-7a5a7957a31f","parameters":{}}}

I tried to add the Restricted Views as File References in the AIP Logic Project, but it does not work. Even trying to create the AIP Logic in the same Project as the Ontology, it throws the same error.

Any ideas on how to solve this?