Auth0-Java 403 Error Grant Type Password not Allowed For Client

Hi - when using auth0-java (GitHub - auth0/auth0-java: Java client library for the Auth0 platform) , I am getting this error:

com.auth0.exception.APIException:
Request failed with status code 403:
Grant type ‘password’ not allowed for
the client.

I have configured my client to use the default_directory of ‘Username-Password-Authentication’ and have created a user there. The code is below, with actual usernames/passwords substituted of course.

AuthAPI auth = new AuthAPI("mydomain.auth0.com", clientId, clientSecret);

AuthRequest request = auth.login("user@mydomain.com", "password")
        .setAudience(myApiAudience)
        .setScope("openid");
    try {
            TokenHolder holder = request.execute();
            } catch (APIException exception) {
            // api error
            System.out.print(exception);
            } catch (Auth0Exception exception) {
            System.out.print(exception);
            //request error
            }

Please see the following post for a similar resolved issue:

http://community.auth0.com/questions/3944/error-grant-type-password-not-allowed-for-the-clie

Although - the user should easily be able to set these from the web app - having to run an API call to enable this seems like a terrible idea.

You can try selecting the password grant in the advanced settings of your Client, under the Grant types section.