Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,20 @@ public virtual async Task<bool> DeleteAgentUserAsync(
}
};

var patched = await _graphApiService.GraphPatchAsync(tenantId, patchPath, patchPayload, ct, requiredScopes);
var patched = false;
try
{
patched = await _graphApiService.GraphPatchAsync(tenantId, patchPath, patchPayload, ct, requiredScopes);
}
catch (Exception patchEx)
{
_logger.LogError(patchEx, "Exception during PATCH of inheritable permissions for blueprint {Blueprint} resource {Resource}", blueprintObjectId, resourceAppId);
return (ok: false, alreadyExists: false, error: patchEx.Message);
}

if (!patched)
{
_logger.LogWarning("PATCH request to update inheritable permissions failed for blueprint {Blueprint} resource {Resource}", blueprintObjectId, resourceAppId);
return (ok: false, alreadyExists: false, error: "PATCH failed");
Comment thread
sellakumaran marked this conversation as resolved.
Outdated
}

Expand Down Expand Up @@ -429,7 +440,7 @@ public virtual async Task<bool> DeleteAgentUserAsync(
}
catch (Exception ex)
{
_logger.LogError("Failed to set inheritable permissions: {Error}", ex.Message);
_logger.LogError(ex, "Failed to set inheritable permissions for blueprint {Blueprint} resource {Resource}: {Error}", blueprintId, resourceAppId, ex.Message);
Comment thread
sellakumaran marked this conversation as resolved.
Outdated
return (ok: false, alreadyExists: false, error: ex.Message);
}
}
Expand Down
Loading