none
Unable to set up azure AD authentication for custom web api

    Question

  • Hello,

    My objective is to set up Azure AD authentication for custom web api I have created using the following link:

    https://docs.microsoft.com/en-us/aspnet/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api

    and I have hosted my app in following url:

    https://microsoftflowcustomwebapi.azurewebsites.net

    Now, as mentioned in below article for "Set up Azure Active Directory authentication", I have created two AAD App registration:

    https://flow.microsoft.com/en-us/documentation/customapi-web-api-tutorial/

    First AAD App:

    Reply URL : http://microsoftflowcustomwebapi.azurewebsites.net/.auth/login/aad/callback

    Second AAD App:

    Reply URL : https://msmanaged-na.consent.azure-apim.net/redirect

    Client secret key : generated.

    Now, here in second AAD App, when I try to set up the required permission, I am unable to delegate the permission as "Select" button is grayed out and not clickable as shown in below screen:


    And I have two questions here !

    1) Why do we require creating two apps for azure authnetication set up ? Cant we do that by one ?

    2) Why I am unable to select the delegate permission setup ?

    Note : Its not a browser issue as I have checked in ME,IE and Firefox, everywhere its happening same.

    Thanks and Regards,

    Dipti  Chhatrapati



    Dipti Chhatrapati





    Monday, April 24, 2017 5:56 PM

Answers

  • Alright, after checking up with different Azure Active Directory and other Azure subscription, I caught that it was human error from my end and UI concern in Azure Portal.

    Actually, to delegate the permission, I directly clicked on "Delegated Permissions" checkbox instead of clicking on "Access Azure Service Management as organization users (preview)" checkbox which prevented the "Select" button to be enabled.

    So, luckily during finding out the solution I clicked on "Access Azure Service Management as organization users (preview)" checkbox at first place while delegating the permission and it worked as expected.

    I hope, its useful to others if anybody is facing the same.

    Best Regards,


    Dipti Chhatrapati



    Wednesday, April 26, 2017 6:29 PM
  • Furthermore, There should not be need of any app registration as authentication process is simplified in modern azure portal by setting the authentication with your azure active directory as shown in below screen:

    Great thing, no need to look for any in depth settings anymore.


    Dipti Chhatrapati

    Thursday, April 27, 2017 7:22 AM

All replies

  • Alright, after checking up with different Azure Active Directory and other Azure subscription, I caught that it was human error from my end and UI concern in Azure Portal.

    Actually, to delegate the permission, I directly clicked on "Delegated Permissions" checkbox instead of clicking on "Access Azure Service Management as organization users (preview)" checkbox which prevented the "Select" button to be enabled.

    So, luckily during finding out the solution I clicked on "Access Azure Service Management as organization users (preview)" checkbox at first place while delegating the permission and it worked as expected.

    I hope, its useful to others if anybody is facing the same.

    Best Regards,


    Dipti Chhatrapati



    Wednesday, April 26, 2017 6:29 PM

  • We are glad to know the issue has been resolved. 
    Thursday, April 27, 2017 1:46 AM
    Moderator
  • Furthermore, There should not be need of any app registration as authentication process is simplified in modern azure portal by setting the authentication with your azure active directory as shown in below screen:

    Great thing, no need to look for any in depth settings anymore.


    Dipti Chhatrapati

    Thursday, April 27, 2017 7:22 AM