Getting error while login with Angular application in Azure AD

Anonymous
2022-02-23T10:50:13.747+00:00

I am getting this error while click on login, I have followed all the steps as mentioned into the tutorial of microsoft.

ClientConfigurationError: url_parse_error: URL could not be parsed into appropriate segments. Given Error: Given url string: 0813d94b-738a-493b-b8b4-71adaa678714/
ClientConfigurationError: url_parse_error: URL could not be parsed into appropriate segments. Given Error: Given url string: 0813d94b-738a-493b-b8b4-71adaa678714/
at ClientConfigurationError.AuthError [as constructor] (AuthError.js:27:1)
at ClientConfigurationError.ClientAuthError [as constructor] (ClientAuthError.js:202:1)
at new ClientConfigurationError (ClientConfigurationError.js:113:1)
at Function.ClientConfigurationError.createUrlParseError (ClientConfigurationError.js:148:1)
at UrlString.validateAsUri (UrlString.js:67:19)
at Authority.set (Authority.js:79:1)
at new Authority (Authority.js:26:1)
at Function.AuthorityFactory.createInstance (AuthorityFactory.js:63:1)
at Function.<anonymous> (AuthorityFactory.js:32:1)
at step (_tslib.js:75:1)
at resolvePromise (zone.js:1213:1)
at zone.js:1120:1
at zone.js:1136:1
at ZoneDelegate.invoke (zone.js:372:1)
at Object.onInvoke (core.mjs:25457:1)
at ZoneDelegate.invoke (zone.js:371:1)
at Zone.run (zone.js:134:1)
at zone.js:1276:1
at ZoneDelegate.invokeTask (zone.js:406:1)

Microsoft Security Microsoft Entra Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Shweta Mathur 30,296 Reputation points Microsoft Employee Moderator
    2022-02-23T11:55:34.03+00:00

    Hi @Anonymous ,

    Thanks for reaching out.

    I understand that you are trying to login using Angular application in Azure AD and getting the ClientConfiguration error.

    This error is due to when configuration has not been correctly set in your application.

    It seems in the app.module.ts application where you are setting the value of authority has not been correctly set.

    If you want to authenticate users against a specific tenant, specify
    authority: 'Enter_the_Cloud_Instance_Id_Here'/'Enter_the_Tenant_Info_Here',

    where
    Cloud_Instance_Id : https://login.microsoftonline.com
    Tenant_Info : Tenant Id(GUID value) or Tenant Name(contoso.microsoft.com)

    So value of authority would be

    authority: https://login.microsoftonline.com/0813d94b-738a-493b-b8b4-71adaa678714

    OR

    authority: https://login.microsoftonline.com/contoso.onmicrosoft.com

    Hope this will help to solve your issue.

    Thanks,
    Shweta

    -------------------------------------------------------------

    Please remember to "Accept Answer" if answer helped you.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.