Hi , Hope doing good!
Add the New Certificate: First, you should add the new certificate that you plan to use for token signing to your Azure AD B2C configuration.
Configure Metadata with Both Certificates: Ensure that the metadata published by Azure AD B2C includes both the old and new certificates. This way, SPs that support metadata updates can retrieve the new certificate information.
Notify Relying Parties: Notify your SPs about the certificate rotation and the presence of the new certificate in the metadata. Encourage them to update their configurations to include the new certificate.
Monitor the Transition Period: Allow some time for SPs to update their configurations to include the new certificate. During this transition period, both certificates (old and new) should be valid and included in the metadata.
Set Expiry on the Old Certificate: After a reasonable amount of time has passed and you believe most SPs have updated their configurations, you can set an expiry date on the old certificate. This effectively forces SPs to use the new certificate for token validation once the old one expires.
- Remove the Old Certificate: Once the old certificate has expired and you are confident that all SPs have updated their configurations, you can safely remove the old certificate from your Azure AD B2C configuration and metadata.
This approach allows you to maintain compatibility with SPs during the transition period, especially for those that rely on the metadata for certificate information. SPs that have hard-coded the X.509 certificate in their configurations will need to update their settings manually or programmatically to use the new certificate.
It's essential to communicate with your SPs throughout this process, providing clear instructions and timelines for the certificate rotation. Additionally, you should carefully plan and coordinate the transition to minimize disruptions to your applications and services.
Please fine MS doc for ref:
https://learn.microsoft.com/en-us/azure/active-directory-b2c/tokens-overview
Also , kindly accept answer if helps, Thankyou!