Hello @Rajarathinam Balasubramaniya and thanks for reaching out. MsalInterceptor is provided for your convenience and may not fit all use cases, you're welcome to write down your own interceptor and/or inherit from the default one so that pre or post processing is added to the token acquire. E.g. When calling the Graph me endpoint but not yet logged as an Azure AD user (but a DB user) you can drop the call or require Azure AD authentication.
Let us know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.
MsalModule.forRoot({
auth: {
clientId: environment.msalModule.clientId,
authority: environment.msalModule.authority,
validateAuthority: true,
redirectUri: environment.msalModule.redirectUri,
postLogoutRedirectUri: environment.msalModule.postLogoutRedirectUri,
navigateToLoginRequestUrl: true,
},
cache: {
cacheLocation: 'localStorage',
storeAuthStateInCookie: false, // set to true for IE 11
},
},
{
popUp: !isIE,
consentScopes: environment.msalModule.consentScopes,
unprotectedResources: environment.msalModule.unprotectedResources,
protectedResourceMap,
extraQueryParameters: {}
}),
providers: [MsalService,
{ provide: HTTP_INTERCEPTORS, useClass: MsalInterceptor, multi: true },
],
app.component.ts
const GRAPH_ENDPOINT = 'https://graph.microsoft.com/v1.0/me';
this.http.get(GRAPH_ENDPOINT)
.toPromise().then(profile => {