Listing IDPs sends an empty response
Listing IDPs returns an empty list despite one existing on my organization. Why would this be?
IDP_OWNER_TYPE_SYSTEM: managed by ZITADEL administrators at the instance levelIDP_OWNER_TYPE_ORG: managed by organization administratorsownerTypeQuery to specify which IDPs you want to retrieve :x-zitadel-orgid header if querying organization-specific IDPs . Without this header, the default is the organization of the requesting user .
AdminService().GetIDPByID ManagementService.GetOrgIDPByID and ManagementService().ListOrgIDPs 
Org Owner membership on the organization that contains the external IDP. The user I was using in my code is from a different organization, despite still having this role. Once I added that Org Owner membership for that user in the respective org, it worked.IAM Owner role for this user does not have permissions to do this. Does it not have elevated permissions vs Org Owner?ORG_OWNER membership on the org that contains the external IDP. Even though they have IAM_OWNER role, if they are from a different org and don't have explicit ORG_OWNER membership in the target org, the API will return an empty list or fail from what I understood.IDP_OWNER_TYPE_SYSTEMIDP_OWNER_TYPE_ORGownerTypeQueryAdminService().GetIDPByIDManagementService.GetOrgIDPByIDManagementService().ListOrgIDPsctx = middleware.SetOrgID(ctx, "<org-id>")
getIDP, err := client.ListOrgIDPs(ctx, &mgmtpb.ListOrgIDPsRequest{
Query: &object.ListQuery{
Offset: 0,
Limit: 10,
Asc: false,
},
Queries: []*mgmtpb.IDPQuery{
{
Query: &mgmtpb.IDPQuery_IdpIdQuery{
IdpIdQuery: &idp.IDPIDQuery{
Id: "<idp-id>",
},
},
},
},
})
if err != nil {
log.Println("get IDP failed with err ", err)
}
if getIDP != nil && len(getIDP.Result) > 0 {
fmt.Println("list of IDPs are ", getIDP.Result[0])
} else {
fmt.Println("no IDPs returned from listing")
}Org OwnerOrg OwnerOrg OwnerIAM OwnerIAM Owner IAM_OWNER Manage the IAM, manage all organizations with their content
[...]
IAM Org Manager IAM_ORG_MANAGER Manage all organizations including their policies, projects and users
[...]
Org Owner ORG_OWNER Manage everything within an organizationIAM_OWNERORG_OWNER {
"queries": [
{
"ownerTypeQuery": {
"ownerType": "IDP_OWNER_TYPE_SYSTEM"
}
}
]
}