• Victor Moses
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
@AuraEnabled
public static void APIUserPasswordReset(){
        System.setPassword('005300000000000000','some generic password');
        }

If I run this method I am getting some weird message System.UnexpectedException: INVALID_SESSION_ID: This session is not valid for use with the API.
The same method if I ran from vf page it is working fine.

If anyone has the same issue and has a solution please let me know.


Thanks
Pramodh