Skip to content

Commit 75c4b80

Browse files
authored
Merge pull request #5246 from reshmee011/guestsharinggroup
Retrieve GuestSharingGroupAllowListInTenantByPrincipalIdentity with correct parse.Closes #5244.
2 parents 19cad56 + d2cdff6 commit 75c4b80

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Commands/Model/SPOTenant.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,17 @@ public SPOTenant(Tenant tenant, ClientContext clientContext, BasePSCmdlet cmdlet
567567
failedProperties++;
568568
cmdlet.LogDebug($"Property DefaultOneDriveInformationBarrierMode not loaded due to error '{e.Message}'");
569569
}
570-
570+
// GuestSharingGroupAllowListInTenantByPrincipalIdentity requires manual handling as it cannot be parsed directly from the Tenant object value
571+
try
572+
{
573+
GuestSharingGroupAllowListInTenantByPrincipalIdentity = tenant.GuestSharingGroupAllowListInTenantByPrincipalIdentity.ToArray();
574+
}
575+
catch (Exception e)
576+
{
577+
failedProperties++;
578+
cmdlet.LogDebug($"Property GuestSharingGroupAllowListInTenantByPrincipalIdentity not loaded due to error '{e.Message}'");
579+
}
580+
571581
// If one or more properties failed to load, show a warning
572582
if (failedProperties > 0)
573583
{

0 commit comments

Comments
 (0)