Forum Discussion

rzinger's avatar
rzinger
Contributor
11 years ago

Changing user's login fails with "Permission Denied", 303 error

Hello,

 

I am logging in as an admin (a username we use for the API calls).  Get user's information, they try to update user's login with the following call: 

 

https://[lithium-server]/[community]/restapi/vc/users/login/[id-of-my-user]/login/set?restapi.session_key=[session_key]

 

Post Parameters:

value=[new value]

 

Get this response: 

 

{"response":{"error":{"message":"Permission Denied","code":303},"status":"error"}} 

 

Any ideas? 

 

 

  • Hi,

     

    the user account your using obviously has API permissions but are you sure it has admin access, it's possible it Has API access but not other permissions required to change a users username. 

     

    Thanks 

    • rzinger's avatar
      rzinger
      Contributor
      yup: user is labeled as admin (if you look at user roles in admin console)... so, not it.
    • Fellsteruk's avatar
      Fellsteruk
      Boss
      I'm not hot on api's "still learning" but to rule access out are you able to change the username via the admin panel? Sure one of the other guys will be able to confirm if the API call needs tweaking.
      • Fellsteruk's avatar
        Fellsteruk
        Boss

        If you log into your community, locate the user then view their profile and it should default to the login page which shows their username if the permissions is right then you will be able to change the username. 

         

  • How are you logging in as an administrator? Are you using the API authentication, SSO, standard lithium login, ...

    • rzinger's avatar
      rzinger
      Contributor

      We have a separate, non-SSO user. We log in via api auth manager call, sending user.login, user.password (I know, so 20th century) but it's the only thing that works with the network infrastructure.  That user is used exclusively for API calls on behalf of other users and is an Admin. 

       

      The actual users authenticate using SSO.