Skip to content

Commit

Permalink
user type can be optional
Browse files Browse the repository at this point in the history
  • Loading branch information
grusin-db committed Oct 14, 2024
1 parent 53d6af9 commit 7efbb70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion azure_dbr_scim_sync/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class GraphUser(GraphBase):
mail: str = Field(validation_alias=AliasChoices('mail', 'mailNickname'))
active: bool = Field(validation_alias=AliasChoices('accountEnabled'), default=True)
user_principal_name: str = Field(validation_alias=AliasChoices('userPrincipalName'))
user_type: str = Field(validation_alias=AliasChoices('userType'))
user_type: Optional[str] = Field(validation_alias=AliasChoices('userType'), default=None)

def to_sdk_user(self):
return iam.User(user_name=self.mail if self.user_type == 'Guest' else self.user_principal_name,
Expand Down

0 comments on commit 7efbb70

Please sign in to comment.