ClientException: Database access is not allowed for the user with roles []
Today in this article, we will cover below aspects,
Issue Description
While accessing NeO4j database using C# or other programming language gives runtime error as below,
Read operations are not allowed for user ‘user1’ with no roles.
OR
ClientException: Database access is not allowed for the user with roles []
Resolution
This error seems could be a configuration issue. This error says the current user trying to access the NeO4j database has restricted access to due to no role or empty role roles[] configuration.
Please check and confirm you User Access configuration. The user ID used for accessing the database should be associated with proper role.
I was able to fix the issue by assigning the required role the user name in the Neo4j desktop editor.
Kindly verify the Roles management section in NeO4j guidelines.
Few example of roles are as below,
- “public”
- “admin”
- “architect”
- “editor
- “publisher”
- “reader”
One can create new roles or associate existing role to user.
After associating the one of the above role , i was able to execute the operation successfully.
Did I miss anything else in these resolution steps?
Did the above steps resolve your issue? Please sound off your comments below!
Reference:
Happy Coding !!
Please bookmark this page and share it with your friends. Please Subscribe to the blog to receive notifications on freshly published(2024) best practices and guidelines for software design and development.