none
Authenticate users from Console to the application without the need of MFA

    Question

  • We have secured our applications using Azure Active Directory B2C service. Users access our application APIs through the console, We have to authenticate users using OAuth.

    Please see my StackOverflow post about the same question

    http://stackoverflow.com/questions/43302213/curl-to-authenticate-to-a-website

    #Setting redirect url in IP variable
    set IP=`curl -w "%{url_effective}\n" -I -L -s -S http://mysite1.com -o /dev/null`
    echo "Trying to Authenticate.."
    curl -L -s -S -I -k -v -i --user "username@microsoft.com" -D ./temp/cookie $IP
    echo "Authentication successful"
    #I need to check if the cookie is set or not, If it is set Authentication is successful
    
    echo "Trying to access the second url"
    #The below line is failing, When I wrote the whole content to html file, I see the error mentioned above (Your browser is currently set to block cookies. You need to allow cookies to use this service) 
    curl --cookie ./temp/cookie https://secondwebsite.com/

    A Typical scenario will be as follows

    1 . Users try to access our APIs/Applications through console

    2. Take them to OpenID Authorization page and ask their username and password. Get Auth_code and Access_token and store it in a cookie on the user's machine

    3. Once the user is Authenticated give them access to the application.

    We were able to achieve this using Curl commands but sometimes MFA page is blocking the flow. Is it possible to do this if so please advice? Please see below for the Curl code that I have been trying.


    ---Mark this post if this Answers or Helps---
    Cheers
    FunnyFox



    Wednesday, April 12, 2017 6:08 AM

Answers

All replies