Not able to query all properties of an Account Employee ntity

  • 1
  • Problem
  • Updated 6 months ago
It doesn't look like the C# Models match the API. I am unable to query all the properties that are showing up for the https://smcoe.sf-api.com/sf/v3/Accounts/Employees query
$sfAccount = Send-SfRequest -Client $sfClient -Entity Accounts\Employees

The following properties are missing:
  • IsDisabled
  • LastAnyLogin
Photo of Brian Lee

Brian Lee

  • 3 Posts
  • 0 Reply Likes

Posted 6 months ago

  • 1
Photo of Brian Lee

Brian Lee

  • 3 Posts
  • 0 Reply Likes
$sfAccount = Send-SfRequest -Client $sfClient -Entity Accounts\Employees

$fileOutput = @()
foreach($sfEmployee in $sfAccount) {
$sfUser = Send-SfRequest -Client $sfClient -Entity Users -Id $sfEmployee.Id -Expand Security
$fileOutput += New-Object PSObject -Property @{'ID'=$sfEmployee.Id;'FirstName'=$sfUser.FirstName;'LastName'=$sfUser.LastName;'Email'=$sfUser.Email;'Disabled'=$sfUser.Security.IsDisabled;'Confirmed'=$sfUser.IsConfirmed;'LastAnyLogin'=$sfUser.Security.LastAnyLogin;}
}