mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-12 10:08:09 +00:00
Fixing bug in registration.py for creating CLI SP's. (#2828)
* Fixing bug in registration.py for creating CLI SP's. * Formatting.
This commit is contained in:
committed by
GitHub
parent
85fe434b3e
commit
0bc22a8073
@ -244,7 +244,6 @@ def create_application_registration(
|
|||||||
app = get_application(
|
app = get_application(
|
||||||
display_name=onefuzz_instance_name, subscription_id=subscription_id
|
display_name=onefuzz_instance_name, subscription_id=subscription_id
|
||||||
)
|
)
|
||||||
|
|
||||||
if not app:
|
if not app:
|
||||||
raise Exception("onefuzz app registration not found")
|
raise Exception("onefuzz app registration not found")
|
||||||
|
|
||||||
@ -338,7 +337,9 @@ def create_application_registration(
|
|||||||
registered_app_id = registered_app["appId"]
|
registered_app_id = registered_app["appId"]
|
||||||
app_id = 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
|
return registered_app
|
||||||
|
|
||||||
|
|
||||||
@ -434,7 +435,6 @@ def get_application(
|
|||||||
filters.append("displayName eq '%s'" % display_name)
|
filters.append("displayName eq '%s'" % display_name)
|
||||||
|
|
||||||
filter_str = " and ".join(filters)
|
filter_str = " and ".join(filters)
|
||||||
|
|
||||||
apps = query_microsoft_graph(
|
apps = query_microsoft_graph(
|
||||||
method="GET",
|
method="GET",
|
||||||
resource="applications",
|
resource="applications",
|
||||||
|
Reference in New Issue
Block a user