If you don’t use azure ad b2c you will need to build the feature yourself. You will need to create an oauth server that has access to the local ad, but is accessible from the cloud hosting your application. This is because you could app will need call the oauth server to validate the token.
If you want to code this, I’d start with your own instance of identity server (no longer free) hosted in your cloud. Then use a virtual network or hybrid connection from the cloud to the local AD exposed via ldap.
https://duendesoftware.com/products/identityserver
https://learn.microsoft.com/en-us/azure/vpn-gateway/tutorial-site-to-site-portal
https://learn.microsoft.com/en-us/azure/app-service/app-service-hybrid-connections