Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Updating Email through REST API

Chris Green
Contributor
October 19, 2021

I'm trying to use this method to update a user's email address (specifically api/2/user -- in the screenshot included), but I'm wondering if this is deprecated because when using a PUT, I get "405 Method Not Allowed". If I use a POST it actually creates a NEW user in Jira/Confluence though. 

My API call is attached as well. Is there another API call to update an email addressed based on an accountId? 2021-10-19_15-10-36.png2021-10-19_15-13-06.png

3 answers

1 accepted

0 votes
Answer accepted
Chris Green
Contributor
October 20, 2021

I believe I have figured this out. I had to be made an Org Admin and then can utilize these API calls (https://developer.atlassian.com/cloud/admin/user-management/rest/intro/).

The only issues I'm having now are:

(1) Duplicate accounts that I removed for users that previously had the email address I'm updating their Primary/Unique account for won't let me update the email address as I get a response of "conflict.emailTaken" - I'm wondering if something is cached. I may need to submit a ticket to Atlassian on that.

(2) The other issue I'm having with some accounts when trying to update the email is "

Error: Caller must be a verified org admin of targeted account or be the targeted account". 
0 votes
Radim Kabeláč October 19, 2021

Try to define only username not key in PUT API call.

Chris Green
Contributor
October 20, 2021

I still get "405 Method Not Allowed".2021-10-20_07-44-48.png

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 19, 2021

Hi @Chris Green 

I do not know if that method is deprecated, but since GDPR went into effect you cannot call such methods with the user name any longer.  Please try with accountId with the appropriate value to see if that helps.

Kind regards,
Bill

Chris Green
Contributor
October 19, 2021

I've also tried this and no luck. I still get "Method not allowed". 

 

2021-10-19_15-50-29.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 19, 2021

After searching a bit, I could not find out if that one is deprecated.  Maybe try to post the same question in the developer community:

https://community.developer.atlassian.com/

And, ask your site admin to submit a support ticket if you are on a paid license:

https://support.atlassian.com/contact/#/

Once you hear back from them, please consider posting back here so the whole community can benefit.  Thanks!

Chris Green
Contributor
October 20, 2021

Will keep you updated!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer