Skip to content

Update umapi.py #809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Update umapi.py #809

wants to merge 1 commit into from

Conversation

Luci2015
Copy link
Collaborator

@Luci2015 Luci2015 commented Dec 5, 2022

Summary

  • A fix to handle the remove/delete of accounts with different email than username (both having email formatted values), when the input is a csv list
  • Modifies the behaviour so that when writing to csv file (--write-file) contains the mail value of the account instead of the username

Testing Steps

  • have in admin console an account with different email than username
  • run the tool with --adobe-only-user-action write-file a.csv argument
  • look inside at the resulting .csv username field -> it should be the current account's email, that the API will use further for other action.
  • run the tool with --adobe-only-user-action delete --adobe-only-user-list a.csv and the account should get deleted from admin console

Fixes #808

@adorton-adobe
Copy link
Collaborator

Thank you for this but I've decided to take a different approach. Since the central issue is that the email address is needed to identify the user for the UMAPI call, I've modified the CSV write function to write the email address instead of the username. The read function now checks for email primarily and only uses username if email is not provided.

As a consequence of this change, I updated the user key format to include email address.

The main changes are here - 651d211

I've also updated all tests that were impacted by the key format change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

users not processed correctly when username and email have different domains
2 participants