Forum Discussion

pbindra's avatar
pbindra
Contributor
11 years ago

Changing user's email

Hello,

 

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

 

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

 

Post Parameters:

value=[new value]

 

Get this response: 

 

{"error":{"message":"A required feature is not enabled: user.view-email.","code":303},"status":"error"}

 

Am I doing some thing wrong? Please help!

 

  • DougS's avatar
    DougS
    Khoros Oracle

    That's not a very helpful error message that the API returns (we are working on building in more helpful error codes into the next version of our API).

     

    Behind the scenes, what's happening is that it has found that the user whose email address you are trying to change is an SSO User and our system does not let you change the email adress of SSO Users by default (since that is often only done via the SSO token).  

     

    If you would like to be able to change an SSO user's email address via the API, you should be able to open a ticket with support and request that the configuration that lets you do this be turned on.

     

    -Doug

    • HaidongG's avatar
      HaidongG
      Lithium Alumni (Retired)

      To allow changing SSO users' email address, there is not necessary to log a ticket via support, it can be done via Admin->System->" Allow SSO user Email changes"

      sso_email.jpg

      • DougS's avatar
        DougS
        Khoros Oracle

        ah, cool -- didn't see that in the Admin.  Thanks Haidong!

  • This thread just solved this same problem for me! Even threads from almost 10 years ago can be useful 😄