Skip to content

Commit

Permalink
user preferred_name instead of directly accessing principal name
Browse files Browse the repository at this point in the history
  • Loading branch information
craddm committed Nov 26, 2024
1 parent 309d777 commit bd045ea
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions data_safe_haven/commands/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ def register(
users = UserHandler(context, graph_api)
available_users = users.entra_users.list()
user_dict = {
user.user_principal_name.split("@")[0]: user.user_principal_name.split("@")[
1
]
user.preferred_username.split("@")[0]: user.preferred_username.split("@")[1]
for user in available_users
}
usernames_to_register = []
Expand Down

0 comments on commit bd045ea

Please sign in to comment.