How do I import Okta metadata into Visual Studio 2013? - c#

I am creating an MVC5 web app that needs federated authentication. We are using Okta. When I create a new Web App, I choose 'Organizational Accounts' for authentication, 'On-Premises', for On-Premises Authority I put in the URL of the Okta meta data, for App ID URI I put in 'https://localhost/Okta', which is what is configured in Okta for the relying party.
When I proceed to create the solution I get an error box titled 'Enable Organizational Authentication' and inside it says 'userSelection.SecurityTokenServiceMetadata.SecurityTokenServiceDescriptor' and that is all. No output in my output window to help.
Can anyone help me get connected to Okta when creating a new MVC5 app in VS2013?

What you probably want to do is add support for WS-Federation to your MVC5 application.
Here is a guide to configuring WS-Federation in Okta. Since you are using MVC5, you'll likely need to set up WS-Federation in OWIN.

Related

ASP.NET (4.X - NOT Core) - How to Set up Azure AD Authentication

Does anyone have experience setting up Azure AD on an ASP.NET 4.X website? I've registered my app in Azure and have been trying to follow the instructions here:
https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app
However, the following docs regarding SSO, etc. are written for ASP.NET MVC/Core applications.
I've tried using OWIN, and it kinda looks like it's working. I get a login prompt, enter my credentials, and pass through, but I had configured IIS 7 to use Windows Auth, so it might be picking up on that. (I've read that Azure authentication is done at the application level, not IIS, so my previous IIS settings might not be affecting anything.)
Does anyone have advice? I don't have experience adding authentication to a website and appreciate any help. Ideally, I was told I'd hit my organizations 365 login page, authenticate through it, and pass on to my website, but this isn't happening. I just get a standard popup login box. (It works, but I don't know if I'm authenticating through Azure.)
You can use Visual Studio 2019 Create a new ASP.NET (not Core) Web Application wizard. Choose any option that supports Authentication and set it to Cloud - Single or Multiple Organizations:

Multi tenant OpenID integration to ASP.Net MVC web application without native .Net authentication support

We have a Asp.Net MVC web application with custom authentication functionality (not using .Net authentication framework). Now we want to integrate it with Azure Active Directory with multi tenant support. I have followed following application example and the sample app directs me to AD login page.
However, when I do same thing in my app, it just redirects me to http://localhost:14223/app/login.aspx?
We are not using FormsAuthentication or anything, so I am not sure how this is happening and what is the process to avoid it.
Any help would be appreciated.
Thanks.
Please read this part of ADAL.NET's conceptual documentation for the ways for confidential client applications (Web applications, Web APIs, daemon applications) to acquire tokens.
More generally you might want to read the full page: Acquiring a token: this depends on the kind of application

Azure Web Application Login

I am completely a novice about Asp.net and Azure platform. I created a simple web application in VS2013 and deployed it to Azure web application. When I try to open my url (xxx.azurewebsites.net) it shows me a login page that my local application does not consist.
I digged some info about it, but due my knowledge level of web development and Azure platform, I did not understand the problem. It seems Azure Active Directory should be used, but I am not certain about it.
My question is, is there a way to skip the login page? If not, how can I define credentials to my application to be accessed?
Thank you.
As far as I know, Visual Studio 2013 offers several authentication options (No Authentication, Individual User Accounts, Organizational Accounts and Windows Authentication) for the Web Forms, MVC, and Web API templates.
According to your description, it seems that you select Organizational Accounts option for your application, which will configure the application to use Windows Identity Foundation (WIF) for authentication based on user accounts in Azure Active Directory (Azure AD, which includes Office 365) or Windows Server Active Directory. If you don’t want authentication for your application, please choose No Authentication option when you create the project.

SSO using Active Directory Federation Services on my .NET (C#) Application

I have an application built in .NET (C# and ASP.NET). We offer our own register/login login, but a client that just signed up with us requested support for ADFS since that's the authentication service they use across their company. This is brand new to me.
How can I add support for ADFS on my application? I'm guessing my client will provide the new users a link to click that I'll have to process for the SSO?
What would my client need to do on their end? (i.e. add groups and assign our future users to those groups?)
What .NET (or 3rd party) libraries can I use?
Thank you!
You could do this with OpenID Connect OWIN but ADFS 3.0 doesn't support this. So you need WS-Fed (WIF).
The easiest way to do this is with VS.
Create a new ASP.NET project and for "Change Authetication" select the on-premises option.
Use the On-Premises Organizational Authentication Option (ADFS) With ASP.NET in Visual Studio 2013.
Obviously ADFS needs to be configured. You need to find out what attributes the application requires in the form of claims.
Code sample which is similar for Azure AD - Integrating a web app with Azure AD using WS-Federation.

How to add a asp.net membership provider to asp.net web application?

I am trying to figure this one out. I am using a simple web service that is hosted by an asp.net web application that is going to be used for authentication for a mobile client and a desktop client and it will also be used to send/receive information to and from the clients.
Right now the service uses custom username and password authentication that is hard coded into the service. I need some kind of authentication though. So I figured I could just add the asp.net membership provider to the web application that is hosting the service, and I could use that database for the members for the service.
This would provide a way for me to manage the users as well. Could anyone tell me if this would work and if so how could it be implmented?
Here is the service I am using: http://www.codeproject.com/Articles/96028/WCF-Service-with-custom-username-password-authenti
It is easy to do. Assuming you're using Visual Studio I suggest using the web site administration tool. A MSDN article describing adding ASP.NET Membership Provider can be found at http://msdn.microsoft.com/en-us/library/6e9y4s5t(v=vs.100).aspx

Categories