WordPress SSO (Single Sign On) using Azure B2C can be integrated using our WP Cloud SSO WordPress Plugin
Establish a trust between Azure B2C and your WordPress blog to enable SSO, so users can login using their Azure AD user account and enable the single sign on experience for your users.
In this guide we will go through the steps to configure WordPress to use Azure B2C using WP Cloud SSO plugin. We will configure Azure AD as your SAML identity provider (IDP) and WordPress as your service provider (SP). WP Cloud SSO allows unlimited user login authentications from Azure AD.
First step is to download our plugin and then Step 1 Setup Azure AD as WordPress IDP
To configure Azure B2C as IdP please follow the steps below:
On Windows, use the New-SelfSignedCertificate cmdlet in PowerShell to generate a certificate.
New-SelfSignedCertificate `
-KeyExportPolicy Exportable `
-Subject "CN=yourappname.yourtenant.onmicrosoft.com" `
-KeyAlgorithm RSA `
-KeyLength 2048 `
-KeyUsage DigitalSignature `
-NotAfter (Get-Date).AddMonths(12) `
-CertStoreLocation "Cert:\CurrentUser\My"
On macOS, use Certificate Assistant in Keychain Access to generate a certificate;
PARENT="yourtenant.com"
openssl req \
-x509 \
-newkey rsa:4096 \
-sha256 \
-days 365 \
-nodes \
-keyout $PARENT.key \
-out $PARENT.crt \
-subj "/CN=${PARENT}" \
-extensions v3_ca \
-extensions v3_req \
-config <( \
echo '[req]'; \
echo 'default_bits= 4096'; \
echo 'distinguished_name=req'; \
echo 'x509_extension = v3_ca'; \
echo 'req_extensions = v3_req'; \
echo '[v3_req]'; \
echo 'basicConstraints = CA:FALSE'; \
echo 'keyUsage = nonRepudiation, digitalSignature, keyEncipherment'; \
echo 'subjectAltName = @alt_names'; \
echo '[ alt_names ]'; \
echo "DNS.1 = www.${PARENT}"; \
echo "DNS.2 = ${PARENT}"; \
echo '[ v3_ca ]'; \
echo 'subjectKeyIdentifier=hash'; \
echo 'authorityKeyIdentifier=keyid:always,issuer'; \
echo 'basicConstraints = critical, CA:TRUE, pathlen:0'; \
echo 'keyUsage = critical, cRLSign, keyCertSign'; \
echo 'extendedKeyUsage = serverAuth, clientAuth')
Note: For example, if your Azure B2C domain is testb2cdomain.onmicrosoft.com, then your tenant name is testb2cdomain.
Next is to enable your Azure AD B2C SSO login buttons, which can be found on the SSO Links tab. Follow the SSO Login Widget page for instructions on setting up.
For more information about Multiple Environments Feature follow the Multiple Environments SSO page.