Replies: 5 comments 4 replies
-
I double-checked and can confirm that update @azure/msal-angular from 3.0.17 to 3.0.20 causes this. Now, the question is, was my configuration broken before, so it worked because of a bug, or is it the other way around? |
Beta Was this translation helpful? Give feedback.
-
I believe I have identified the issue, or what has changed between versions. It is still not clear why, as the documentation for v3.0.17 and v3.0.21 are the same in this area, however in v3.0.21 you must provide the full resource path. For example, in my environment.ts file I have always had only the api path itself:
Then this stopped working in v3.0.21. However i noticed that the graph api
After this change to my protectedApi's list, my implementation is now working again on v3.0.21. So, as you said, it seems our apps were working on previous versions based on a potential bug that was patched in v3.0.19 that now requires us to provide the full pathing. Since I am working in a monorepo with multiple apps, I am using an app-config service that instantiates all my msal config dynamically. So in my method for creating the Interceptor Config, I just adjusted my code to be like so:
Adding the concatenation of So, to address @danvod, I believe if you update your protecedApi's to be like:
This should solve the issue. |
Beta Was this translation helpful? Give feedback.
-
I will try this out and report back. Is there a chance that the documentation will be updated to include a more detailed guide for setting up the routes? |
Beta Was this translation helpful? Give feedback.
-
@jo-arroyo, could you please take a look at this discussion and provide your insights? Your help would be greatly appreciated. I can offer additional information if needed. |
Beta Was this translation helpful? Give feedback.
-
raised a PR to fix this and the older issue as well. |
Beta Was this translation helpful? Give feedback.
-
Hi, I feel I am either greatly misunderstanding the documentation or just incorrectly using the interceptor.
My issue is that I simply don't get a token attached for some requests.
My unprotected resources:
My protected resources:
So all I want is:
Here is my latest attempt at protectedResourceMap
This seemed to work correctly until I updated
@azure/msal-browser from 3.14.0 to 3.17.0 and
@azure/msal-angular from 3.0.17 to 3.0.20
I have tried fully specifying everything, e.g. localhost:5555/api/v1, tried api, /api, /api/ and all the possible permutations you could imagine.
No matter what I try, my /api/v1/usermanagement/identity-user/{userId}/{otherUserParam}/permissions do not get a token.
If I hardcode the entire route, it is fine, but that is obviously not a valid solution because of parameters representing userIds.
What am I missing? This is driving me crazy as it seems like a trivial requirement.
Beta Was this translation helpful? Give feedback.
All reactions