How to create user with root policy

I have created users in the vault with the root policy attached to it.

 *vault write auth/userpass/users/testuser password=testuser policies=root*

When I try to login with user testuser it failed exception is authentication failed authpass cannot create root token

you cannot assign the default “root” policy to any token, what you can do is to create another policy with the permissive policy look alike “root”