title: Use MSAL in .NET C# to execute a custom policy flow in Azure AD B2C
body: <p>I am currently using OpenIdConnect to execute HTTP GET requests for my Azure B2C custom policies. For example here is the Unified SignInSignUp:</p>
  
  <pre><code>public static void Unified(HttpRequest Request, HttpResponse Response)
  {
      string nonce = "defaultNonce";
      string clientID = ConfigurationManager.AppSettings["aad.clientid"];
      string authUrl = ConfigurationManager.AppSettings["aad.authUrl"];
      string redirectUri = ConfigurationManager.AppSettings["aad.redirecturi"];
      string unifiedPolicy = ConfigurationManager.AppSettings["aad.unifiedPolicy"];
  
      // build url for AAD auth and redirect to ourself 
      StringBuilder sb = new StringBuilder();
      sb.AppendFormat("{0}?", authUrl);
      sb.AppendFormat("p={0}", unifiedPolicy);
      sb.AppendFormat("&amp;client_id={0}", clientID);
      sb.AppendFormat("&amp;redirect_uri={0}", redirectUri);
      sb.AppendFormat("&amp;nonce={0}", nonce);
      sb.AppendFormat("&amp;scope=openid");
      sb.AppendFormat("&amp;response_type=id_token");
      sb.AppendFormat("&amp;prompt=login");
      sb.AppendFormat("&amp;response_mode=form_post");
  
      // redirect to auth via AAD (and then redirect back to ourself)
      Response.Redirect(sb.ToString(), true);
  }
  </code></pre>
  
  <p>I would like to use MSAL instead but am having trouble finding a C# .NET sample that executes an HTTP GET request like I am doing with OpenIdConnect. My current technique returns the id_token just fine, but I would like to take advantage of MSAL's capabilities like caching etc. </p>
  
  <p>Is such a sample around?</p>