I need to be able to get an identity/access token to a backend API for a native client, where the native client must use native UI to collect username and password.
I w
Is it possible to get a token from Azure AD B2C by programmatically posting username and password somewhere?
You can use the Azure AD Client Credential Flow to obtain a token. See this SO Post.
ROPC might be the right OAuth Flow for you, but before you start using it, you might want to check out this blog post: Why the Resource Owner Password Credentials Grant Type is not Authentication nor Suitable for Modern Applications.