Thank you for posting this in Microsoft Q&A.
As I understand you are unable to connect to ZZZZZ using XXXX credentials.
In the above scenario, XXXX account is an external account for ZZZZZ client that you are using. The error indicates that the external account that the user signs in with doesn't exist on the tenant that they signed into.
To fix this issue you will have to add user XXXX as a guest user in ZZZZZ tenant. And also assign XXXX guest user to ZZZZZ application in the tenant.
You can follow below article to add XXX user to ZZZZ tenant as B2B user,
https://learn.microsoft.com/en-us/entra/external-id/add-users-administrator
https://learn.microsoft.com/en-us/entra/external-id/b2b-quickstart-add-guest-users-portal
Let us know if you have any further questions.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.