feat(api): allow filtering apps by client id and entity id (#11385)

# Which Problems Are Solved

There's currently no way to retrieve a project based on the client_id of
an application. A developer would need to iterate through all projects
and their applications to make the correlation.

# How the Problems Are Solved

- Added a possibility to filter for `client_id` and `entity_id` on the
ListApplications endpoint.
- Added the `project_id` on the `Application` response (used on the
ListApplications endpoint).

# Additional Changes

None

# Additional Context

- closes #11340 
- requires backport to v4.x
This commit is contained in:
Livio Spring
2026-01-22 07:41:35 +00:00
committed by GitHub
parent 597f385ca4
commit 7d6a2950b4
6 changed files with 171 additions and 5 deletions
@@ -37,6 +37,9 @@ message Application {
APIConfiguration api_configuration = 7;
SAMLConfiguration saml_configuration = 8;
}
// The ProjectID represents the ID of the project the application belongs to.
string project_id = 9;
}
enum ApplicationState {
@@ -69,6 +72,14 @@ message ApplicationSearchFilter {
// Filter for specific application types.
ApplicationType type_filter = 4 [(validate.rules).enum = {defined_only: true, not_in:[0]}];
// Filter the applications by the clientID
// This is only applicable for OIDC and API applications.
ClientIDFilter client_id_filter = 5;
// Filter the applications by their entityID
// This is only applicable for SAML applications.
EntityIDFilter entity_id_filter = 6;
}
}
@@ -95,6 +106,30 @@ message ApplicationNameFilter {
zitadel.filter.v2.TextFilterMethod method = 2 [(validate.rules).enum.defined_only = true];
}
message ClientIDFilter {
// The clientID to search for. The search is performed as an exact match.
string client_id = 1 [
(validate.rules).string = {
min_len: 1,
max_len: 200
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"client-12345\""},
(google.api.field_behavior) = REQUIRED
];
}
message EntityIDFilter {
// The entityID to search for. The search is performed as an exact match.
string entity_id = 1 [
(validate.rules).string = {
min_len: 1,
max_len: 200
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"https://example.com/saml/v2/metadata\""},
(google.api.field_behavior) = REQUIRED
];
}
enum ApplicationType {
APPLICATION_TYPE_UNSPECIFIED = 0;
APPLICATION_TYPE_OIDC = 1;