How to get the current User ID in an Apex class? September 5, 2013June 9, 2022InfallibleTechie Admin UserInfo.getUserId() is used to get the current User ID in an Apex class. String Uid = UserInfo.getUserId();