Questions tagged [msal-angular]
172 questions
1
vote
0 answers
MsalService / PublicClientApplication is null when trying to logout
Problem at High Level
I have an Angular application that successfully connects to an Azure AD application for authentication. There are no problems with this at all so far. The issue is when I am trying to perform a logout function. And I think the…

Jason
- 11
- 2
1
vote
1 answer
Module '"@azure/msal-angular"' has no exported member 'MSAL_CONFIG'
I have an Angular 11 project where I'm trying to import MSAL_CONFIG in app.module, but I only get the error above.
import { MsalBroadcastService, MSAL_CONFIG, MsalGuard, MsalGuardConfiguration, MsalInterceptor, MsalInterceptorConfiguration,…

Agnete
- 53
- 1
- 8
1
vote
2 answers
Get access token Azure AD using client_secret key (client credential flow) Angular application
Our client wants us to implement a trusted subsystem design, meaning they have their Azure AD (Client AD) to authorize the users for the frontend. And asked us to use our own Azure AD (Dev AD) to authorize the frontend to the backend. We managed…

Vitalii Polulikh
- 69
- 1
- 4
1
vote
1 answer
How to pass clientId in different environment to AppModule
I use msal to do authentication. In my AppModule.ts (from the example)
@NgModule({
declarations: [
AppComponent,
HomeComponent,
ProfileComponent
],
imports: [
BrowserModule,
AppRoutingModule,
MsalModule.forRoot( new…

Hello
- 796
- 8
- 30
1
vote
2 answers
Office 365 - "535: 5.7.3 Authentication unsuccessful"
I am sending O365 mail using MSAL library. Generating access token in front-end(angular) and pass the token to back-end(.Net) for send mail. After that is throw an exception saying "535: 5.7.3 Authentication unsuccessful". But if I generate token in…

Chathura Ishan
- 21
- 1
- 8
1
vote
1 answer
How to configure msal-angular interceptor to send an access token (v2) to own domain (self)
I updated to @azure/msal-angular v2 from v1. And I cannot figure out how to configure it to send an access token to my backend hosted on the same domain.
So when my frontend makes a request to /api/foo then the MsalInterceptor should attach my…

Snæbjørn
- 10,322
- 14
- 65
- 124
1
vote
2 answers
MSAL Angular MsalGuard configuring local storage clear on token expiry
I am doing a POC on MSAL implementation on our Angular app.
Requirements: The user has to login once a day. When he visits more than once, he is to be taken directly to the app with no login interaction. The auth flow is only required for…

Senthamizh
- 53
- 1
- 10
1
vote
0 answers
Ionic 5 Capacitor with Microsoft SSO
I am trying to implement Microsoft SSO with Ionic 5 but am having no luck. I have tried using @azure/msal-angular @azure/msal-browser method but this seems to only work in web. Has anyone tried to implement this recently?
Here is the error I'm…

Vinny P.
- 21
- 9
1
vote
1 answer
Is there a way to know when an msal redirect is in progress?
Im using the @azure/msal-browser and @azure/msal-angular packages in order to simply retrieve an MSAL token for my signed in users. Since all I really need is the token I have only provided the MsalService and MSAL_INSTANCE in my app.module.ts. I am…

skyleguy
- 979
- 3
- 19
- 35
1
vote
0 answers
Cors error when request API with Azure idtoken in Angular-msal2
I'm using angular-msal2 to login to Azure AD and access my webapi on Azure. when I run http.get, it give me a CORS error as followed:
this.http.get("https://wgceworkflow-as.azurewebsites.net/api/demo/all")
…

qwer11121
- 138
- 2
- 15
0
votes
1 answer
MSAL angular. Net
Application -
.Net 6 web API
Angular frontend
SQL DB
.Net 6 Windows Service
I need to achieve following -
Authorization code flow, where angular app get the auth code and send it to .net 6 web api, which internally get the access token by auth…

Ishika Jain
- 949
- 2
- 11
- 23
0
votes
2 answers
Angular Authentication/Authorisation with Azure AD connecting to .net Core WebAPI
Followed countless tutorials regarding this…

Simon
- 1,412
- 4
- 20
- 48
0
votes
1 answer
MSAL login in chrome extension: 'redirect_uri' is not valid
I build a chrome extension use Angular. In this extension I use @azure/msal-angular to login.
What can I do to login in chrome extension?
Here is my extension image:popup image
When I first click Login, console…

sinno.song
- 1
- 2
0
votes
1 answer
How to access and import from msalService in class, as import from (and not module)?
Got an issue in one specific file where accessing the token happens before setting the token.
(I know i should/could rewrite and dig deep down to fix it, but we dont have time...)
Accessing and importing from msal works well in modules…

Terje Nygård
- 1,233
- 6
- 25
- 48
0
votes
0 answers
Can Angular interceptors hook into GET requests defined in the template of the Angular component?
Problem context
Our team is building an enterprise content management system.
The content management system will include images that will need to be protected by user security.
Most HTTP requests are protected using MSAL pattern described below:…

Michael Rosario
- 838
- 1
- 11
- 26