OpenFGA CLI - Cannot Authorize

Am I able to interact with a store/model from the OpenFGA CLI? I am trying to upload this model to my Free Tier at the moment and having the toughest time getting this to actually allow me to do this. Keeps throwing me a 403.


fga store get --api-url "https://api.us1.fga.dev" --client-id "client_id_here" --client-secret "client_secret_here" --api-token-issuer "api.us1.fga.dev" --store-id "my_store_id"

Yes, that should work. Can you paste the error you are getting?

Modified it slightly to add

--api-token-issuer "fga.us.auth0.com" --api-audience "https://api.us1.fga.dev/"

Now i am getting the following

Error: failed to get store MYSTOREIDHERE due to GetStore auth error for GET GetStore with body {“code”:“unauthorized_principal”,“message”:“missing permissions to perform operation”}

Right, sorry. fga store get is not supported on Okta FGA, as we don’t have a public API to get Store details.

fga model get or fga model write should work.

Okay yah looks like fga model get works! Thank you.

Now the real question. I have a modular setup for the store here with a fga.mod file and two sub-modules at the moment.

In terms of fga model write can I pass in --file and then point it to fga.mod? Assuming i would need to set the --format flag to be modular?

Ok just tried this and looks like it works!