Giter Club home page Giter Club logo

Comments (11)

navyasric avatar navyasric commented on June 20, 2024

@rohrerb Can you please provide details about your app and its use case? How do you propose to use ADAL for your app?

from azure-activedirectory-library-for-python.

rohrerb avatar rohrerb commented on June 20, 2024

The use case is the same as users who want to automate/script out this process using PS. Not all users have the capability to use powershell (MAC or Linux users). Please support mfa automation/scripting through other languages such as python.

from azure-activedirectory-library-for-python.

rayluo avatar rayluo commented on June 20, 2024

Hey @rohrerb , does the comments in the other issue here help?

from azure-activedirectory-library-for-python.

mattxbart avatar mattxbart commented on June 20, 2024

I'm running into the same issue. I want to execute a script to use the graph api but since MFA doesn't work I have to use an app permission instead of delegating through my user. I would really like to see MFA support or a suggestion on how to do this without using web based interactions.

from azure-activedirectory-library-for-python.

rayluo avatar rayluo commented on June 20, 2024

@mattxbart To make sure we are on the same page, what API call was your script trying to use? Was it acquire_token_with_username_password(...) or something else?

Also, what is your expectation of "MFA support"? If you mean a fully-automation that totally bypass MFA, that is probably what MFA was trying to prevent. If you mean to trigger an interactive flow for end user to complete MFA, which can be considered as semi-automation, it would rely on web based interaction under the hood.

Nonetheless, if you can use app permission to avoid an end user role, that is probably the better way to go. Conceptually speaking, when your app does not need to impersonate an end user, it can then do lots of things, automatically.

from azure-activedirectory-library-for-python.

mattxbart avatar mattxbart commented on June 20, 2024

Yes @rayluo, I'm trying to use acquire_token_with_username_password. I was expecting it to prompt for the MFA code but it threw an error message about a problem with MFA. I can use the app permission, it just didn't seem as secure as using an MFA enabled method but I will do that now. Thanks!

from azure-activedirectory-library-for-python.

Preston-Landers avatar Preston-Landers commented on June 20, 2024

@mattxbart Is your application a web app? If so you can use acquire_token_with_authorization_code with users who must sign in with MFA.

from azure-activedirectory-library-for-python.

dimuthulakshan avatar dimuthulakshan commented on June 20, 2024

@Preston-Landers I am usingacquire_token_with_authorization_code with code_verifier='PKCE', Still it didn't pop up MFA for user login. Are there any other configuration in python?

token_response = auth_context.acquire_token_with_authorization_code(code, REDIRECT_URI, azure_config.RESOURCE, azure_config.CLIENT_ID, azure_config.CLIENT_SECRET, 'PKCE')

Appreciate your support, Thanks

from azure-activedirectory-library-for-python.

rayluo avatar rayluo commented on June 20, 2024

@dimuthulakshan The PKCE thing is not relevant in MFA topic. Just follow @Preston-Landers 's hint to use acquire_token_with_authorzation_code() in the normal way, and then the MFA - if required - would be triggered by service side and be completed inside the browser.

from azure-activedirectory-library-for-python.

rayluo avatar rayluo commented on June 20, 2024

At this point, the ADAL Python library will not receive new features. Its successor, MSAL Python, is generally available, and release the acquire_token_interactive() behavior for desktop app since MSAL 1.7.0, and the initiate_auth_code_flow() & acquire_token_by_auth_code_flow() for web app (with a working example here). You folks can give it a shot.

from azure-activedirectory-library-for-python.

rayluo avatar rayluo commented on June 20, 2024

Implemented in MSAL Python 1.7+. Please switch to MSAL Python.

from azure-activedirectory-library-for-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.