Hi @Alex ,
Thanks for reaching out.
I understand you are trying to setup up sign in for Java application using Azure AD B2C and getting error due to invalid authority value configured in your application.
The Authority value indicates a directory that MSAL can request tokens from, and its URL differ in Azure AD and Azure AD B2C.
The values you have configured earlier in authority are used to get token from Azure AD,
https://login.microsoftonline.com/common/ allows to access applications for users with work and school accounts and personal Microsoft accounts or in case of multi-tenant applications where users from different organization can sign into the application request token with this URL.
To restrict sign in users from your organization (directory), you need to restrict authority URL for your tenant only https://login.microsoftonline.com/<tenantID>
Another URLs you are using are authorize endpoint to get the tokens which is not valid authority values.
For B2C tenant which allow sign in users with social identities need to build around the policy (User flows or custom policy) for all Users. B2C's authority URL in MSAL also have policy name parameter which specifies the policy Azure AD B2C should use.
Here policyName is the name of the user flow or custom policy to apply. For example, a sign-up/sign-in policy like b2c_1_signIn
and <tenant-name> is the name of B2C tenant.
and these authorities need to add in knownAuthorities config parameter to trust the B2C authority.
Hope this will help.
Please remember to "Accept Answer" if answer helped you.