@AuraEnabled
public static String setPassword( String userId, String password) {
User usr =[SELECT id, Name FROM User WHERE Username =: userId];
System.setPassword(usr.Id, password);
}
Getting Error:
FATAL_ERROR System.UnexpectedException: INVALID_SESSION_ID: This session is not valid for use with the API