Skip to content
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

Search users by user ids #498

Merged
merged 1 commit into from
Mar 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@
"flake8.importStrategy": "fromEnvironment",
"mypy-type-checker.importStrategy": "fromEnvironment",
"isort.importStrategy": "fromEnvironment",
"black-formatter.importStrategy": "fromEnvironment"
"black-formatter.importStrategy": "fromEnvironment",
"workbench.colorCustomizations": {
"activityBar.background": "#4D1C3B",
"titleBar.activeBackground": "#6B2752",
"titleBar.activeForeground": "#FDF8FB"
}
}
5 changes: 5 additions & 0 deletions descope/management/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@
to_created_time: Optional[int] = None,
from_modified_time: Optional[int] = None,
to_modified_time: Optional[int] = None,
user_ids: Optional[List[str]] = None,
) -> dict:
"""
Search all users.
Expand All @@ -622,6 +623,7 @@
to_created_time (int): Optional int, only include users who were created on or before this time (in Unix epoch milliseconds)
from_modified_time (int): Optional int, only include users whose last modification/update occurred on or after this time (in Unix epoch milliseconds)
to_modified_time (int): Optional int, only include users whose last modification/update occurred on or before this time (in Unix epoch milliseconds)
user_ids (List[str]): Optional list of user IDs to filter by

Return value (dict):
Return dict in the format
Expand Down Expand Up @@ -669,6 +671,9 @@
if login_ids is not None:
body["loginIds"] = login_ids

if user_ids is not None:
body["userIds"] = user_ids

Check warning on line 675 in descope/management/user.py

View workflow job for this annotation

GitHub Actions / Coverage

Missing coverage

Missing coverage on line 675

if text is not None:
body["text"] = text

Expand Down
Loading