function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Admin DNAAdmin DNA 

get client ip in community component for guest users

Hi, is there a way to get the ip address of the connected guest user?
I try the below code but it works for the logged user but returns null for the guest users:
@AuraEnabled    
public static String GetUserIPAddress() {
string ReturnValue = Auth.SessionManagement.getCurrentSession().get('SourceIp');