import { MsalInterceptorConfiguration , MsalGuardConfiguration } from '@azure/msal-angular' ; import { InteractionType , Configuration } from '@azure/msal-browser' ; const isIE = window . navigator . userAgent . indexOf ( 'MSIE ' ) > - 1 || window . navigator . userAgent . indexOf ( 'Trident/' ) > - 1 ; export const MsalConfig = { auth : { clientId : '2dfea037-938a-4ed8-9b35-c05708a1b241' , authority : 'https://login.microsoftonline.com/common/' , redirectUri : 'http://localhost:4200/' , postLogoutRedirectUri : 'http://localhost:4200/' , navigateToLoginRequestUrl : true } , cache : { cacheLocation : 'localStorage' , storeAuthStateInCookie : isIE } } ; const consentScopes = [ 'user.read' , 'openid' , 'profile' ] ; const protectedResourceMap = new Map < string , Array < string > > ( ) ; protectedResourceMap . set ( 'https://graph.microsoft.com/v1.0/' , consentScopes ) ; export const MsalInterceptorConfig = { interactionType : ! isIE ? InteractionType . Popup : InteractionType . Redirect , protectedResourceMap } ; export const MsalGuardConfig = { interactionType : ! isIE ? InteractionType . Popup : InteractionType . Redirect , authRequest : { scopes : consentScopes } , loginFailedRoute : '/' } ;