AndrewPla / TOPdeskPS

PowerShell module to interact with the TOPdesk API
MIT License
30 stars 12 forks source link

New-TDPerson DepartmentId paramter not working #57

Closed bartstinissen closed 5 years ago

bartstinissen commented 5 years ago

When you want to create a person with the command New-TDPerson with the parameter "DepartmentId" with a correct DepartmentId value, the follwing error occurs:

Command:

New-TdPerson -Surname $Surname -BranchId (Get-TdBranch -Name $Office).id -DepartmentId (Get-TdDepartment | Where-Object Name -EQ "$Department" | Select -ExpandProperty id) -Email $PRD_EMailAddress -FirstName $FirstName -JobTitle $JobTitle -ManagerId (Get-TdPerson -Email $Manager).id -MobileNumber $Mtel -NetworkLoginName $loginname -PhoneNumber $VTel -TasLoginName $PRD_EMailAddress

Error:

Invoke-RestMethod : [{"message":"The field 'departmentId' does not exist."}] At line:86 char:17

AndrewPla commented 5 years ago

Fixed in #59