<PackageReference Include="Microsoft.Identity.Client" Version="4.87.0" />

Microsoft.Identity.Client.IByUsernameAndPassword

public interface IByUsernameAndPassword
Provides an explicit interface for using Resource Owner Password Grant on Confidential Client.

Acquires a token without user interaction using username and password authentication. This method does not look in the token cache, but stores the result in it. Before calling this method, use other methods such as AcquireTokenSilent to check the token cache.