BCApps icon indicating copy to clipboard operation
BCApps copied to clipboard

[BC Idea]: OAuth2 Authorization Code Flow with PKCE

Open diogoviegas2855 opened this issue 2 years ago • 9 comments

BC Idea Link

https://experience.dynamics.com/ideas/idea/?ideaid=c432a449-f9e5-ee11-a73d-6045bdb71da1

Description

Provide support for Authorization Code Flow with PKCE by adding overloads or procedures to codeunit 501 OAuth2 and codeunit 502 OAuth2Impl.

If an external party requires Authorization Code Flow with PKCE there is no method that allows to add additional query parmeters to the authorization URL.

The intention of this issue is to add overloads or procedures to provide functionality to allow the OAuth2 flow with code_verifier and code_challenge parameters.

I will provide the implementation for this BC Idea

  • [X] I will provide the implementation for this BC Idea Internal work item: AB#521506

diogoviegas2855 avatar Mar 19 '24 14:03 diogoviegas2855

Just encountered this with a client where they require support for conditional access authentication context (claims, acrs). I see this is approved back in March. Is anyone aware if this has been actioned I see that there's an internal work item that has been created for this?

mickcarr avatar Sep 10 '24 09:09 mickcarr

This issue hasn't been picked up yet. @diogoviegas2855 suggested to provide a fix, but I haven't come across one yet 😊

JesperSchulz avatar Sep 27 '24 10:09 JesperSchulz

I haven't had the time to provide a fix, i will try to do it in the future, but if anyone wanna provide one first :)

diogoviegas2855 avatar Sep 27 '24 11:09 diogoviegas2855

Happy to pick up this one if you don't mind.

ajkauffmann avatar Dec 09 '24 11:12 ajkauffmann

Happy to pick up this one if you don't mind.

It's all yours, my friend 🥳

JesperSchulz avatar Dec 10 '24 10:12 JesperSchulz

@ajkauffmann is this still on your todo list? We are in the same situation as @mickcarr, (MFA with conditional access).. so we could use a solution for this in BC : )

DevHarmonize avatar Feb 10 '25 13:02 DevHarmonize

:robot: AI triage completed. Product group, please validate the triage report (Microsoft internal access only, use Ctrl+Click to open in new tab).


Was this triage helpful? React with :thumbsup: or :thumbsdown: on this comment to provide feedback.

JesperSchulz avatar Jun 22 '26 18:06 JesperSchulz

@ajkauffmann, is this something you want to pick up, or should we close this issue for now? It's been dormant for a while now. As promised at Directions, I'll try to push things forward (or remove the things which aren't active).

JesperSchulz avatar Nov 03 '26 13:11 JesperSchulz

@JesperSchulz I would love to pick it up. However, the OAuth2 app is using DotNet components. I wouldn't be able to add PKCE support for that.

My own OAuth module, as added to D4P CCMS, is built in pure AL, without any DotNet component. It could be a replacement, and it would make things more flexible going forward. It also solves the current caching issue in the OAuth module that was reported in another repo.

That requires a decision on your end, would you be willing to let the DotNet component go in favor of a full AL solution? Or do you think the DotNet component has added value? If so, then we can't contribute and it will always land at Microsoft.

ajkauffmann avatar Nov 20 '26 10:11 ajkauffmann