sharepoint online – How to get/update all user profiles via CSOM?

I need to get and update user profile properties in SharePoint Online via CSOM. I am using .net core CSOM.
App is registered via appinv.aspx page.

Permissions:

<AppPermissionRequests AllowAppOnlyPolicy="true">
<AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl" />
<AppPermissionRequest Scope="http://sharepoint/social/tenant" Right="FullControl" /> 
</AppPermissionRequests>

Here is sample code:

ctx =  new AuthenticationManager().GetACSAppOnlyContext(config.TenantURL, "id", "secret");
PersonProperties personProperties = peopleManager.GetPropertiesFor(userName);
// PersonProperties personProperties = peopleManager.GetMyProperties();
ctx.Load(personProperties);
ctx.ExecuteQuery();

If I am getting my personal profile it works fine (GetMyproperties), but it fails if I try to get anyones else profile. Could someone suggesth what am I doing wrong? Thx!