Hello @Tetyana Mykhnevych
When no user interaction is required, we use application context in that case. In such scenarios, client credentials flow is used. However, B2C currently doesn't support client credentials flow. Which means, you can't use yourtenant.b2clogin.com domain to perform client credentials flow. However, you can use login.microsoftonline.com/yourtenant for client credentials flow, which uses standard Azure AD functionality and not the B2C functionality of the tenant.
Here is an active feedback link for this feature in B2C: https://feedback.azure.com/forums/169401-azure-active-directory/suggestions/18431254-b2c-support-for-client-credential-flow. Kindly vote for it so that product team prioritize this feature in future roadmap.
-----------------------------------------------------------------------------------------------------------
Please do not forget to "Accept the answer" wherever the information provided helps you. This will help others in the community as well.