Skip to content

Instantly share code, notes, and snippets.

@sjwaight
Created May 5, 2018 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjwaight/c2e86e1dab653d48809e006efcbc63cb to your computer and use it in GitHub Desktop.
Save sjwaight/c2e86e1dab653d48809e006efcbc63cb to your computer and use it in GitHub Desktop.
Updated sample B2C client application configuration
public partial class App : Application
{
private static string Tenant = "YOUR_TENANT.onmicrosoft.com";
private static string ClientId = "YOUR_API_APPLICATION_ID";
public static string PolicySignUpSignIn = "B2C_1_YOUR_POLICY_susi";
public static string PolicyEditProfile = "B2C_1_YOUR_POLICY_profile";
public static string PolicyResetPassword = "B2C_1_YOUR_POLICY_pwdedit";
public static string[] ApiScopes = { "" };
public static string ApiEndpoint = "https://localhost/demo-api/";
private static string BaseAuthority = "https://login.microsoftonline.com/tfp/{tenant}/{policy}/oauth2/v2.0/authorize";
public static string Authority = BaseAuthority.Replace("{tenant}", Tenant).Replace("{policy}", PolicySignUpSignIn);
public static string AuthorityEditProfile = BaseAuthority.Replace("{tenant}", Tenant).Replace("{policy}", PolicyEditProfile);
public static string AuthorityResetPassword = BaseAuthority.Replace("{tenant}", Tenant).Replace("{policy}", PolicyResetPassword);
private static PublicClientApplication _clientApp = new PublicClientApplication(ClientId, Authority, TokenCacheHelper.GetUserCache());
public static PublicClientApplication PublicClientApp { get { return _clientApp; } }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment