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

Commit

Permalink
Fixing bug in registration.py for creating CLI SP's. (#2828)
Browse files Browse the repository at this point in the history
* Fixing bug in registration.py for creating CLI SP's.

* Formatting.
  • Loading branch information
nharper285 authored Feb 10, 2023
1 parent 85fe434 commit 0bc22a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/deployment/deploylib/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ def create_application_registration(
app = get_application(
display_name=onefuzz_instance_name, subscription_id=subscription_id
)

if not app:
raise Exception("onefuzz app registration not found")

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

authorize_and_assign_role(app_id, registered_app_id, approle, subscription_id)
authorize_and_assign_role(
UUID(app_id), UUID(registered_app_id), approle, subscription_id
)
return registered_app


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

filter_str = " and ".join(filters)

apps = query_microsoft_graph(
method="GET",
resource="applications",
Expand Down

0 comments on commit 0bc22a8

Please sign in to comment.