From 9e8570aef744bdad912e7cd62c70992c9c6c4658 Mon Sep 17 00:00:00 2001 From: joelhulen Date: Wed, 11 Dec 2024 14:09:41 -0500 Subject: [PATCH 1/3] Return the ID of any object not found within the Graph API --- .../MicrosoftGraphIdentityManagementService.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/dotnet/Common/Services/Security/MicrosoftGraphIdentityManagementService.cs b/src/dotnet/Common/Services/Security/MicrosoftGraphIdentityManagementService.cs index 6e926dd488..9f6a101c61 100644 --- a/src/dotnet/Common/Services/Security/MicrosoftGraphIdentityManagementService.cs +++ b/src/dotnet/Common/Services/Security/MicrosoftGraphIdentityManagementService.cs @@ -133,6 +133,20 @@ public async Task> GetObjectsByIds(ObjectQueryParameters }); } + // Add to the results an `ObjectQueryResult` object for any `parameters.Ids` that are not in the results. + foreach (var id in parameters.Ids) + { + if (results.All(x => x.Id != id)) + { + results.Add(new ObjectQueryResult + { + Id = id, + DisplayName = id, + ObjectType = ObjectTypes.Other + }); + } + } + return results; } From 68fbb6b7ce9f1f79de8c9eca542be35556024348 Mon Sep 17 00:00:00 2001 From: joelhulen Date: Wed, 11 Dec 2024 14:10:01 -0500 Subject: [PATCH 2/3] Handle null principals --- src/ui/ManagementPortal/components/RoleAssignmentsTable.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/ManagementPortal/components/RoleAssignmentsTable.vue b/src/ui/ManagementPortal/components/RoleAssignmentsTable.vue index 0035c2d339..e668d3d9cb 100644 --- a/src/ui/ManagementPortal/components/RoleAssignmentsTable.vue +++ b/src/ui/ManagementPortal/components/RoleAssignmentsTable.vue @@ -138,7 +138,7 @@