From 3468a7ccd50700c28e10d08a8b9db2d27561ff10 Mon Sep 17 00:00:00 2001 From: Bryant Date: Fri, 10 Nov 2023 16:38:31 -0800 Subject: [PATCH 1/3] fix lookup for custom locations rp sp to use appId instead of displayName --- src/connectedk8s/azext_connectedk8s/custom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connectedk8s/azext_connectedk8s/custom.py b/src/connectedk8s/azext_connectedk8s/custom.py index b75132b0ffa..86d412366c5 100644 --- a/src/connectedk8s/azext_connectedk8s/custom.py +++ b/src/connectedk8s/azext_connectedk8s/custom.py @@ -2194,7 +2194,7 @@ def get_custom_locations_oid(cmd, cl_oid): try: sp_graph_client = get_graph_client_service_principals(cmd.cli_ctx) sub_filters = [] - sub_filters.append("displayName eq '{}'".format("Custom Locations RP")) + sub_filters.append("appId eq '{}'".format("bc313c14-388c-4e7d-a58e-70017303ee3b")) # lookup using well-known first-party application id result = list(sp_graph_client.list(filter=(' and '.join(sub_filters)))) if len(result) != 0: if cl_oid is not None and cl_oid != result[0].object_id: From f127ccfb78ed27c9773ba6c0b68a8e368e2a90be Mon Sep 17 00:00:00 2001 From: Bryant Date: Fri, 10 Nov 2023 17:52:21 -0800 Subject: [PATCH 2/3] fix style --- src/connectedk8s/azext_connectedk8s/custom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connectedk8s/azext_connectedk8s/custom.py b/src/connectedk8s/azext_connectedk8s/custom.py index 86d412366c5..9180373adf7 100644 --- a/src/connectedk8s/azext_connectedk8s/custom.py +++ b/src/connectedk8s/azext_connectedk8s/custom.py @@ -2194,7 +2194,7 @@ def get_custom_locations_oid(cmd, cl_oid): try: sp_graph_client = get_graph_client_service_principals(cmd.cli_ctx) sub_filters = [] - sub_filters.append("appId eq '{}'".format("bc313c14-388c-4e7d-a58e-70017303ee3b")) # lookup using well-known first-party application id + sub_filters.append("appId eq '{}'".format("bc313c14-388c-4e7d-a58e-70017303ee3b")) # Lookup using well-known first-party application id result = list(sp_graph_client.list(filter=(' and '.join(sub_filters)))) if len(result) != 0: if cl_oid is not None and cl_oid != result[0].object_id: From 1da4e3610376ec3e5a2b9fb2a83b3eb89d3c8191 Mon Sep 17 00:00:00 2001 From: Bryant Date: Fri, 10 Nov 2023 18:55:43 -0800 Subject: [PATCH 3/3] updated version and history --- src/connectedk8s/HISTORY.rst | 4 ++++ src/connectedk8s/setup.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/connectedk8s/HISTORY.rst b/src/connectedk8s/HISTORY.rst index 5f7ce0b8ab0..2ded57126f1 100644 --- a/src/connectedk8s/HISTORY.rst +++ b/src/connectedk8s/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +1.5.5 +++++++ +* Lookup Custom Locations objectId using appId instead of displayName + 1.5.4 ++++++ * Log debug if 'arcConfigEndpoint' doesn't exist in 'dataplaneEndpoints' ARM metadata. diff --git a/src/connectedk8s/setup.py b/src/connectedk8s/setup.py index a5b1eb63d25..e4ab91bf545 100644 --- a/src/connectedk8s/setup.py +++ b/src/connectedk8s/setup.py @@ -17,7 +17,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '1.5.4' +VERSION = '1.5.5' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers