I have the same issue as well. It seems like when we add Authentication to protect Azure Function then we get this error. If we don't add it then it works properly.
Getting AADSTS1100001: Non-retryable error has occurred. after adding custom claims provider
I have set up a tenant for testing various authentication methods by using my Visual Studio Enterprise Subscription. Users are synced from on premise AD and pass through authentication is used. I have set up test app and I could authenticate and get access token on the side of the app. Then, because of the project requirement, I tried to add custom claims provider. First I used my app and set up everything based on https://video2.skills-academy.com/en-us/entra/identity-platform/custom-extension-get-started?tabs=entra-admin-center%2Chttp and I got error: AADSTS1100001: Non-retryable error has occurred.
After various attempts to correct this I deleted everything and then did exactly what is described in tutorial from the link and I still got the same error.
Is there any way to find out what is causing this error or is there any way to resolve it or work around it?