So, I created azure b2c directory, and created inside it application like https://github.com/Azure-Samples/active-directory-b2c-javascript-msal-singlepageapp, and I created azure function in general azure directory that suppose to read blob and return json file. Also I created custom login page for sign in. I ran my program locally, and I can login, and instead of call API that uses in github, I call azure function and it works. But now I want to secure access to function, so I make authLevel 'user' and try to make Authentication via Azure Active Directory. And no mater how I make settings, or I can't connect because I don't have permissions, or I can't use function because I don't have permissions. Also I get this error The client id ’/.auth/login/aad/callback' specified in the request is not registered in tenant ‘’.”
How should I connect function to b2c so only authorised users can have access to function response.