0

We have a website that runs on our local server which has a publicly available domain. This site has a sql server data source and pages to work with the data. This site needs to require a login to access it.

Now, all the users that will use this site also have an account in our 365 online, and I don't want to issue a separate username and password for my local site.

Is there a way to make my own webapp use Sharepoint's authentication so users wouldn't need two logins?

I'm looking at this page from Microsoft to add microsoft.aspnetcore.authentication.microsoftaccount. Am I right to think this will let me use the authentication in my own webform app?

1 Answer 1

1

What you'll want to do is create an app registration in Azure Active Directory and sign your users in using that.

There are a bunch of tutorials/samples on the web (like this one) but they're more aligned with .Net Core/MVC. If you're running WebForms you might some additional sleuthing to do.

6
  • Hmmm... I've not worked with MVC yet. Not really wanting to learn something else.
    – bgmCoder
    Nov 17, 2020 at 21:22
  • Would you choose Razor or MVC? Both are asp.net core, no?
    – bgmCoder
    Nov 17, 2020 at 22:16
  • Yeah. There's more content on the web for MVC so if you don't want to have to figure a bunch of stuff out, it's probably the way to go. On the other hand, Razor is more similar to web forms in that you have a sort of "code-behind" pattern although it's not quite the same. Nov 18, 2020 at 0:52
  • Sorry, one more question and I'm getting off-topic (and I'm reading up on these topics); the solution you linked - it says MVC, but isn't Razor MVC, too? I'm suspecting I can't use Razor.
    – bgmCoder
    Nov 18, 2020 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.