title: adding azure ad b2c authentication to azure function spa
body: <p>I am trying to build a <strong>Single Page App</strong> with <strong>Azure Functions</strong> so that when user wants to visit my website they can visit the url of my azure function which will be a custom domain, like www.contoso.com</p>
  
  <p>But when they visit it first they must automatically go to login page for <strong>Azure AD B2C</strong> and after they login they get redirected to my <strong>SPA</strong> with their info.</p>
  
  <p>I know how to create a SPA with azure functions without authentication, and I also know how to configure an <strong>azure b2c tenant</strong>, I've also added azure ad b2c authentication into Azure Function -> Authentication -> Azure AD -> Advanced.</p>
  
  <p>My question is, how can I initiate the login process for the user, just like in a normal website. In a normal asp website, visual studio provides options to integrate this, but how can I do the same for azure functions?</p>