-
Notifications
You must be signed in to change notification settings - Fork 147
resource returned with 'spn: {id}' #128
Comments
+1 Have also experienced the same problem: |
BUMP! Manually did the change of setting api version to None and it stripped the spn:. Can we get the same change as the python library? |
Thanks for everyone who participated this conversation thread. The different behavior of that resource value is indeed controlled by the presence or absence of the "api-version=1.0". However we do not clearly know how many customers out there are unknowingly relying on the current "api-version=1.0" behavior, so we do not want to simply remove it and potentially break existing customer's code. The change we did for ADAL Python library, i.e. exposing the api-version as an optional parameter YET MAINTAINING OLD BEHAVIOR, as well as updating samples and README, is a temporary solution. We will revisit this later. Meanwhile, feel free to adapt the PR #149 from @dstrimble as a workaround for now. (Thanks @dstrimble !) |
I am still seeing this issue, actually i saw this issue when i was trying to see that caching on the library is not working. The reason why its not working is because when it compares the resource it finds the 'spn:' in the beginning and basically creates a new token for the same request. Can anybody help on that, if i am missing anything? |
Hi, I am also experiencing the same behaviour, which causes a "IDX10214: Audience validation failed" error when invoking my API App URL. You could add a config flag, or an optional parameter to omit that annoying api-version, without breaking anyone else's code. Regards |
Hi, Would you let us know any progress or decision for this problem? We are using the HACK but it should not be a permanent option. Please take care of this issue. Thanks! |
At least please reply if you're accepting pull requests, so we can fix it. Regards |
Thanks for your interest in helping. I've updated my earlier comment to include the way we introduced a workaround for this in ADAL Python. A pull request in ADAL Nodejs will need to follow similar approach. |
Regarding customers relying on the current "api-version=1.0" behavior: Please consider introducing a new major version (e.g. 1.0.0) of the adal-node npm package so you can break backward compatibility per https://docs.npmjs.com/getting-started/semantic-versioning |
Thanks @hashtagchris ! That is the plan. We will try to include more shiny new features in the 1.0 version too. |
please have a look here : |
temporary fix for: AzureAD#128
I plan on using the aforementioned workaround for now, but is there any update on the proper fix? |
Sorry we don't currently have an update for this one. I'm looping our PM @navyasric into this conversation in order to keep track of the user voice. |
This has been open for ages and still no proper fix? Is this still the official library or should we be using something else instead? |
It's a shame that there isn't yet a work-around, as it would save many users a lot of time. In the interim, if you are looking for a way to get a client credential, that's auth with client id and client secret, then here is what I figured out: Microsoft documents the http call for authenticating a service to a service: I found that if you remove the You only need to make a single request to get the bearer token with client credentials:
You can test it in postman and make your own wrappers around the response in node. For handling token expiration and refreshes, I found that the https://github.com/lelylan/simple-oauth2#helpers Good luck |
I am having the same issue but with Client Token validation. Any update on this? |
Workaround for AzureAD#128
Based on #149 I removed the api-version parameter and published |
This has been going on for 3 years! I stumbed on the issue writing an interface to AAS in Node (to run on linux) where Microsoft expects the resource to be https://*.asazure.windows.net. @hashtagchris your repo works, where the official one is broken, apparently for 3 years. Thanks! |
Thanks for all your patience. This is now fixed in release 0.2.0 after we merged #186. You will still need to manually opt-in for the new behavior. |
Hello and thank you for providing this library!
having passed a resource of
00000002-0000-0000-c000-000000000000
I get back a token which has
resource: 'spn:00000002-0000-0000-c000-000000000000'
^ note the spn
This seems to differ from the Angular version of the library which returns the resource without the spn. Is there a parameter I can pass to suppress this behaviour, or is that something that is desired/expected?
Thanks!
The text was updated successfully, but these errors were encountered: