Hello @Veli-Jussi Raitila , in order to delete an Azure AD B2C local consumer account, you can leverage the Microsoft Graph API and/or one of its SDK. Take a look to the Delete a user operation. Ensure the sign-up user journey outputs the User's Object ID claim so that you can pass it to the MS Graph call. Also, you will need to Register a Microsoft Graph application, expose the required permissions and, optionally and as replacement for tenant-wide consent, provide fine-grained consent.
For more information about what can be done trough Microsoft Graph, take a look to Manage Azure AD B2C with Microsoft Graph.
Let us know if you need additional assistance. If the answer was helpful, please accept it and rate it so that others facing a similar issue can easily find a solution.