AD B2C custom policy and Microsoft Graph belong to completely different systems.
The id
mentioned in MS Graph document can only be available in Microsoft Graph. There is no direct way to get it in Custom policy.
You need to call Microsoft Graph List phoneMethods somehow in Custom policy to get the MFA id by following Integrate REST API claims exchanges in your Azure AD B2C custom policy. (similar steps here)
But based on this post, it seems that if using Microsoft Graph, the format of the phone number is different with the one in Azure portal.
So you can choose to implement this sample Azure AD B2C: Edit MFA phone number suggested in that answer.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…