'Can't login to WSO2 using API after changing password using user update API in patch method

I created a user using the API http://localhost:9443/wso2/scim/Users. Then I could generate access token for login using the http://localhost:9443/wso2/oauth2/token?grant_type=password&username={username}&password={password} before updating the password.
But after updating the password using http://localhost:9443/wso2/scim/Users/{scim_id} in PATCH method, I could not generate access token using http://localhost:9443/wso2/oauth2/token?grant_type=password&username={username}&password={password} like before.
What could be the reason? I using email address as username and I can login to console using the new password



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source