django-auth-adfs icon indicating copy to clipboard operation
django-auth-adfs copied to clipboard

Version 2.0 - AADSTS901002: The 'resource' request parameter is not supported.

Open fabianallendorf opened this issue 3 years ago • 3 comments

I get this error when I set VERSION settings variable to v2.0. My backend app exposes the v2.0 endpoint. The documentation specifies that Version 2.0 is possible and even recommended for new projects. However, as soon as build_authorization_endpoint is called, the resource parameter is added to the query. I don't see how this works. Do I have to configure it in a different way?

I use AdfsAuthCodeBackend to authenticate against my backend app.

fabianallendorf avatar Nov 01 '21 08:11 fabianallendorf

Hey. I see. I haven't been able to test out this implementation my self. :/ I'll see what I can do (but probably not before the weekend), unless you want to attempt to fix it and provide a pull request.

You'll have to change this to have a conditional check, and only add that query parameter if the version setting is not v2.

JonasKs avatar Nov 01 '21 10:11 JonasKs

Ok, sounds reasonable, I might try it and include the changes in my PR which I have already opened.

fabianallendorf avatar Nov 01 '21 12:11 fabianallendorf

Seems like #209 got it working. I’d try again.

JonasKs avatar Dec 10 '21 11:12 JonasKs