I’m running into problems trying to connect my Azure B2C setup with HubSpot’s JWT-based single sign on for private content.
I have Azure B2C working with custom user flows through the Identity Experience Framework. Now I want to enable SSO in HubSpot so users can access protected website content after authenticating through Azure B2C.
The main issue is with JWT signing algorithms. HubSpot’s SSO configuration only accepts HS256 algorithm, but Azure B2C tokens use RS256. When I configure the shared secret in HubSpot, it forces me to select HS256 since that’s the only option available.
However, the tokens coming from Azure B2C have this header structure:
{
"alg": "RS256",
"kid": "ABC123xyz_TokenSigningKey_ExampleValue",
"typ": "JWT"
}
After users complete authentication, they get sent to HubSpot’s verification endpoint with the token, but I keep getting TOKEN_VERIFICATION_FAILED errors. The error message says the token might be empty, incorrect, or using unsupported parameters.
I think the problem is the algorithm mismatch between what HubSpot expects (HS256) and what Azure B2C provides (RS256). I’ve tried looking for ways to change Azure B2C to use HS256 instead, but everything I’ve found suggests that Azure B2C only supports RSA-based signing.
Has anyone successfully integrated Azure B2C with HubSpot’s JWT SSO feature? Is there a workaround for this algorithm compatibility issue?