Hello @Lukas Steiblys,
Based on the error message code AADSTS500011 what you are getting, please check the below causes and resolution.
Cause
This issue occurs if the resource principal (the application or service) is not found in the tenant. This issue occurs if:
- The resource application isn't provisioned by the administrator in the tenant.
- The resource application isn't consented to by any user in the tenant.
- The resource URL is not configured correctly.
- The tenant ID is not correct.
Resolution
To resolve this issue, follow these steps:
- Verify resource application provisioning:
- Make sure that the application (resource principal) is registered correctly in your Microsoft Entra ID tenant.
- Go to the Azure portal, and navigate to Microsoft Entra ID > Enterprise applications.
- Check whether the application is listed and correctly configured.
- Consent to application:
- Make sure that the resource application has been consented to by an administrator or a user in the tenant.
- Go to the Azure portal, and navigate to Microsoft Entra > Enterprise applications.
- Find the application, and make sure that it has the necessary permissions and consent.
- Check resource URL:
- Verify that the resource URL that appears in the error message matches the resource application that you provisioned in your tenant ID.
- Make sure that the authentication request is sent by using the correct resource URL.
- Check tenant ID:
- Verify that the tenant ID that appears in the error message is the same as your tenant ID.
- Make sure that the authentication request is sent to the correct Microsoft Entra ID tenant.
Reference document for this error code AADSTS500011 is attached below.
Error AADSTS500011 - Resource Principal Not Found | Microsoft Learn
I hope this above information provided is helpful. Please feel free to reach out if you have any further questions.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".