I found this article. Maybe it will help you:
https://christianhelle.com/2025/01/scalar-azure-authentication.html
Example: https://github.com/christianhelle/ScalarAzureAuthentication