Rest/Api: Removing a user's email seems not work

Stefan Hall shared this problem 8 days ago
Awaiting Reply

Hello,

I send a request against the rest/api according to the documentation:
https://developers.yellowfinbi.com/dev/api-docs/current/#operation/updateUserAdmin

If I set PATCH with {"emailAddress": ...

  • null }, I received 200 OK, but email ist NOT cleared/deleted
  • ""}, I received 400 Bad Request

if I change the email together with the first name, only the first name is changed (in the 200 OK case). Unfortunately, it looks like another API error to me ;(


;) Stefan

Version 9.13

Replies (4)

photo
1

Hello Stefan,

My name is Deepak Chaganti from the Yellowfin Technical Support Team. We have received your support request, and I will be your primary contact on the following ticket:

Ticket Number: #31465
Case Title: Rest/Api: Removing a user's email seems not work

Thanks for sharing the details.

Could you please confirm if our main goal here is to remove the email address of an admin user ? or change the email address of the user?

I will try to perform the same operation in Postman on my end.

Sincerely,

Deepak Chaganti

Yellowfin Technical Support Engineer

photo
1

Hi Stefan,

Yes, that is correct.

Even in the UI, we won't be able to leave the email field as 'null':

0934ea85be5ecab14f9e98e0298dd967



Could you please let us know the actual requirement of saving email as null so that I can discuss the business requirement with the wider team?

Thanks,

Deepak

photo
1

Hi Deepak,

The use case is quickly explained: we need to synchronize the personal data in all systems with our central HR system. If the user does not have an email there or the email address has been removed (for whatever reason), this must also be done in all other systems.

I would also set the email to an empty string, but then I get a 400 bad request ;)

Fortunately, you use the userid for the registration process and not the email address.

;) Stefan

photo
photo
1

Hi Stefan,

I have reached out to the wider team with the use case scenario.

I will provide you with an update once I hear back from the team.

Regards,

Deepak

photo
1

Hi Stefan,

I have an update rom the team:

Unfortunately, it is not possible to leave email field as null/empty because it is still used unique identifier for the user even if we choose 'username' login instead of email.

A workaround is to switch on login by username, then set the email address to some random value that passes email validation, such as <random uuid>@a.b . This value would have to be different for each user.

Please let me know if that helps.

Thanks,

Deepak

photo
1

Hi Deepak,

OK, but then the API documentation is wrong. It says: “can also be empty”.

;) Stefan

photo
1

Hi Stefan,

The team is currently investigating the API documentation which says it can be empty.

Please let me know if you would like this to be raised as an enhacement request or if there is anything else that I can assist you with.

Thanks,

Deepak

photo
Leave a Comment
 
Attach a file