locked
Create C# WebApi that can Authenticate different sister company users RRS feed

  • Question

  • Hi there,

    I need to plan for solution where, Web apis needs to get data from SQL and return in JSON.

    Well the catch is API can be accessed using other sister company users also,

    I am not sure how should I do this, should I create service or any middle layer that will take care about Authentication?.

    Currently few sister companies using ADFS and Azure, but new vendor / sister companies using Okta/OpenID/xyz

    1) NOW what should be the right approach to decide the Authentication process (Use case)?

    2) And how to achieve that using asp.net 4.6 / .netcore.

    (I think asp.net 4.6 should be good as it supports ADFS(On-Prem) and Online Auth both.

    3) Also should I create a login screen to check domain name and depending on Domain redirect to Auth Provider?

    4) Please do share Sample code / related blog, the standard msdn pages has limited info.

    Any suggestion/idea is appreciated, its bit urgent and very important.


    Saturday, November 16, 2019 5:33 PM

All replies

  • ask here: https://forums.asp.net/1246.aspx/1?Web+API

    .Net BCL (e.g. System.Text or System.Globalization) has no support for web development. 



    Visual C++ MVP

    Saturday, November 16, 2019 8:41 PM
  • Hi TheCodeMan8, 

    Thank you for posting here.

    In my opinion, use which process is based on your requirement. Both ADFS and Azure AD is a good auth process .

    If you want to allow the client which out-side your domain to access your application, you could choose AAD.

    About how to use AAD, you could refer to this document.

    Quickstart: Add Microsoft identity platform sign-in to an ASP.NET web app

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 18, 2019 8:07 AM
  • I have seen this Uri, but It doesn't help me,

    How should I achive Token based Authentication? and here Authentication provider can be MS or Okta or open ID.

    any sample code or demo will be helpful

     

    Monday, November 18, 2019 9:01 AM
  • Hi TheCodeMan8,

    I note that you have post the same question in ASP.NET forum, and I hope you can get better help and solve your problem in that forum.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Tuesday, November 19, 2019 10:15 AM