Permission issue when writing/updating with apoc.periodic.iterate

I am connecting through bolt protocol to a Neo4j Server instance.
When using apoc.periodic.iterate to set a property (calling apoc.ttl.expire), I get errors like this:

"org.neo4j.graphdb.QueryExecutionException: Set property for property 'ttl' on database 'neo4j' is not allowed for user 'andrea' with roles [PUBLIC, admin] overridden by TOKEN_WRITE overridden by READ."

Why is that if I should be assigned an admin role? Why do those final "overridden by.." occur?

Thanks

Hi Andrea,
I encountered the same issue😢, Did you solve this problem?

Hello @andrea_bucci and @song :slightly_smiling_face:

Can you share the query, the database version and the APOC version?

Regards,

Cobra

I have created an issue. https://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/3161

Hello,
Something similar here, when doing a MERGE in apoc.when

LOAD CSV WITH HEADERS FROM 'file:///Faulty.csv' AS line

CALL apoc.when(line.town IS NOT NULL,

"MERGE (v:Ville {name: line.town, height: line.height})",

"",{line: line}

) YIELD value

RETURN value

Create node with labels 'Ville' on database 'neo4j' is not allowed for user 'neo4j' with roles [PUBLIC, admin] overridden by READ.

Unfortunately, I found no apoc specific setting that could solve it
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/071eb592a6afe26840219e3fe00e20fda56b36e1/core/src/main/java/apoc/ApocConfig.java

And I have no idea why roles/auths seems to be applied in reverse

Hola, SOLUCION!
lo que esta pasando es que la funcion no tiene permisos de escritura,
para eso te sugieron cambiar la funcion .iterate
por la funcion
CALL apoc.do.case

esta funcion si tiene permisos de escritura y cualquier codigo que estes haciendo con apoc.periodic.iterate se puede homologar a apoc.do.case