Reputation: 1569
We have an application protected under Azure AD custom app, using MSAL Library in .NET core MVC web application.
Now we want to automate functional test using Azure CICD pipeline.
When we try to run this automation there is one blocker with MFA where we need to approve manually.
Can I avoid this MFA? I don't want to update conditional access policy as security team already rejected that approach.
Is there a way I can generate the token using secret and then login in to the browser? How can I bypass the login?
Upvotes: 1
Views: 2075
Reputation: 1569
Mocking authentication is too much work. We use Azure Key Vault to save user credentials and dynamically get data from Key vault in the pipeline. This is a secure way to use credentials.
Upvotes: 1
Reputation: 3505
You cannot bypass MFA unless you mock authentication and authorization which is pretty doable in .NET Core. If you go the selenium route then take a look to How to resolve Multi Factor authentication for AAD in Selenium test in CI, it might help.
Upvotes: 1