Skip to content

Instantly share code, notes, and snippets.

@glautenschlager-wavefin
Created February 4, 2025 15:02
Show Gist options
  • Save glautenschlager-wavefin/e78d06e9a6524057e4e0fc852255eab0 to your computer and use it in GitHub Desktop.
Save glautenschlager-wavefin/e78d06e9a6524057e4e0fc852255eab0 to your computer and use it in GitHub Desktop.
Manually segmenting a user in identity
# 1. okteto up in identity project folder
# 2. ./manage.py shell_plus
# 3. run the following:
from migration.constants import EMBEDDED_PAYROLL_SEGMENT, SegmentedApps
from migration.rpc import migrate_qualified_user
user_email = "your_email@example.com"
user = User.objects.get(email=user_email)
migrate_qualified_user(user.identity_user_id, SegmentedApps.EMBEDDED_PAYROLL, EMBEDDED_PAYROLL_SEGMENT)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment