Thank you for posting your query on Microsoft Q&A, based on above description I could understand that you are trying to access an Azure AD/Entra ID registered application with external account and are getting access denied with message "Selected user account does not exist in tenant 'mydomain.com' and cannot access the application 'myapplication-id-asdasdasd-asdasdasda-asdasd' in that tenant. The account needs to be added as an external user in the tenant first. Please use a different account."
Please do correct me if this is not the case by responding in the comments section:
Seems like currently your application is registered as a single tenant app hence it won't allow users from any other directory.
Multi-tenant application will allow the accounts in any organizational directory to login.
If you want accounts in any organizational directory and personal Microsoft accounts to login, you should use Azure AD v2.0 endpoint and change your account type.
Or you may also change the Supported account types to Accounts in any organizational directory (Any Azure AD directory - Multitenant)
Thanks,
Akshay Kaushik
Please "Accept the answer" (Yes), and share your feedback if the suggestion answers you’re your query. This will help us and others in the community as well.