Skip to content

Commit

Permalink
fix lookup for custom locations rp sp to use appId instead of display…
Browse files Browse the repository at this point in the history
…Name (Azure#6982)
  • Loading branch information
keystroke authored Dec 6, 2023
1 parent d34ab9e commit 2e3b496
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/connectedk8s/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/connectedk8s/azext_connectedk8s/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2e3b496

Please sign in to comment.