1
votes

I am updating my web application to use the new msal library, @azure/msal-angular. I have previously used the old adal library. The frontend web application is written in angular 5 and it makes calls to the backend application that is an asp net core web api. Both of them use the same app registration in Azure AD (apps v1). The frontend application makes requests to the Microsoft Graph api, Dynamics CRM and the backend web api. I am not using the msal get access token methods, only the msal config. In the config I can only use the scopes for either Microsoft graph or Dynamics CRM. If I use both I get an error from Microsoft that my scopes are incorrect. When I use the Dynamics CRM scope , crm url + '/.default', I don't get an access token, also the token for my backend is a version 2.0 for some reason and always asks for the admin consent even when I have already gave it. The frontend request use the @ngx-resource/core library. The admin consent is requested in the ResourceHandlerHttpClient.prototype.handleResponse when I do a backend web api request, also the req property passed has an empty header property so I get another error when getting keys from the req header property.

I do not understand why am I getting an empty req header property, the only thing different in the frontend application is that I am trying to use the new msal library.

Can someone tell how to correctly configure my msal config so I can pass all the necessary consents and get the three needed access tokens, version 1.0 ?

My goal is to remove adal library from angular5 project and to use msal library to get the same tokens as with adal.

1
Can you edit your question to include the code which is behaving unexpectedly? Have a look at How to create a Minimal, Complete, and Verifiable example.Philippe Signoret

1 Answers

0
votes

Regarding the issue, I think you should register a new application in Azure Portal. For more details, please refer to the document.