Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 0bc22a8

Browse files
authored
Fixing bug in registration.py for creating CLI SP's. (#2828)
* Fixing bug in registration.py for creating CLI SP's. * Formatting.
1 parent 85fe434 commit 0bc22a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/deployment/deploylib/registration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ def create_application_registration(
244244
app = get_application(
245245
display_name=onefuzz_instance_name, subscription_id=subscription_id
246246
)
247-
248247
if not app:
249248
raise Exception("onefuzz app registration not found")
250249

@@ -338,7 +337,9 @@ def try_sp_create() -> None:
338337
registered_app_id = registered_app["appId"]
339338
app_id = app["appId"]
340339

341-
authorize_and_assign_role(app_id, registered_app_id, approle, subscription_id)
340+
authorize_and_assign_role(
341+
UUID(app_id), UUID(registered_app_id), approle, subscription_id
342+
)
342343
return registered_app
343344

344345

@@ -434,7 +435,6 @@ def get_application(
434435
filters.append("displayName eq '%s'" % display_name)
435436

436437
filter_str = " and ".join(filters)
437-
438438
apps = query_microsoft_graph(
439439
method="GET",
440440
resource="applications",

0 commit comments

Comments
 (0)