A cloud-based identity and access management service for securing user authentication and resource access
You can, but there are requirements for that as detailed for example here: https://learn.microsoft.com/en-us/graph/api/user-update?view=graph-rest-1.0&tabs=http#example-3-update-the-passwordprofile-of-a-user-and-reset-their-password
In addition, changing the password on a privileged user requires the Privileged Authentication Admin role to be assigned to the service principal in the resource tenant.