The Environment
I have an Azure B2C tenant for managing simple username/password sign-up and sign-in, following the example found here: https://github.com/Azure-Samples/active-directory-b2c-javascript-hellojs-singlepageapp
The tenant manages the authentication for a javascript/html application on the front end, and then that front-end application communicates with a WebAPI application on the back-end for its data.
The back-end WebAPI is taken from the example found here: https://github.com/Azure-Samples/active-directory-b2c-dotnet-webapp-and-webapi
Both applications are registered with the tenant and require authentication in order to work.
What Works
Authentication works great when testing it directly from the Azure portal.
The successful authorize request:
Request URL:https://login.microsoftonline.com/dhzb2c.onmicrosoft.com/oauth2/v2.0/authorize?p=B2C_1_SiUpIn&client_id=2bb37577-246c-48a7-b047-2ce2a748dfda&nonce=defaultNonce&redirect_uri=http%3A%2F%2Flocalhost%3A65328%2Fredirect.html&scope=openid&response_type=id_token&prompt=login
Request Method:GET
What Doesn't Work
When attempting to log in via the front-end with the back-end registered in the tenant, I get this:
Correlation ID: 4ac6f519-0949-42e0-96a7-d84d14454bbb
Timestamp: 2017-07-10 23:07:48Z
AADB2C90205: This application does not have sufficient permissions against this web resource to perform the operation.
And the API back-end is never reached.
The unsuccessful authorize request:
Request URL:https://login.microsoftonline.com/tfp/dhzb2c.onmicrosoft.com/B2C_1_SiUpIn/oauth2/v2.0/authorize?client_id=2bb37577-246c-48a7-b047-2ce2a748dfda&response_type=token%20id_token&redirect_uri=http%3A%2F%2Flocalhost%3A65328%2Fredirect.html&state=%7B%22client_id%22%3A%222bb37577-246c-48a7-b047-2ce2a748dfda%22%2C%22network%22%3A%22adB2CSignInSignUp%22%2C%22display%22%3A%22page%22%2C%22callback%22%3A%22_hellojs_cprxketk%22%2C%22state%22%3A%22%22%2C%22redirect_uri%22%3A%22http%3A%2F%2Flocalhost%3A65328%2Fredirect.html%22%2C%22scope%22%3A%22openid%2Chttps%3A%2F%2Fdhzb2c.onmicrosoft.com%2Ftestb2capi%22%2C%22page_uri%22%3A%22http%3A%2F%2Flocalhost%3A65328%2Findex.html%22%7D&scope=openid%20https://dhzb2c.onmicrosoft.com/testb2capi
Request Method:GET
What I've Tried
I have tried looking for logs, like a permissions error log, that would tell specifics about the problem, but have found none.
Question
Perhaps there is another place I need to look for logs?
What else can I do?
Authentication error messages are designed to limit the information they provide, so there has to be some way to get greater specificity about the error. What do I not know?