Skip to content

Commit 696712b

Browse files
authored
Add role to Directory Sync User object (#267)
Add role to directory user
1 parent 7212d48 commit 696712b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

tests/utils/fixtures/mock_directory_user.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ def __init__(self, id):
3737
],
3838
}
3939
self.object = "directory_user"
40+
self.role = {
41+
"slug": "member",
42+
}
4043

4144
OBJECT_FIELDS = [
4245
"id",
@@ -55,4 +58,5 @@ def __init__(self, id):
5558
"custom_attributes",
5659
"raw_attributes",
5760
"object",
61+
"role",
5862
]

workos/resources/directory_sync.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ class WorkOSDirectoryUser(WorkOSBaseResource):
8585
"custom_attributes",
8686
"raw_attributes",
8787
"object",
88+
"role", # [OPTIONAL]
8889
]
8990

9091
@classmethod

0 commit comments

Comments
 (0)