AndrewPla / TOPdeskPS

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

No permission to create login credentials? #84

Closed whatthehomepod closed 5 years ago

whatthehomepod commented 5 years ago

Prerequisites

Put an X between the brackets on each line to confirm you have completed them:

Describe the bug Following bug is showing up:

Invoke-RestMethod : [{"message":"No permission to create login credentials"}]
At line:76 char:9
+         Invoke-RestMethod @Params
+         ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Connect-TdService -url 'http://localhost' -Credential $TDCred -UserType operator
New-TdPerson -LastName $Lastname -FirstName $Firstname -FirstInitials $Initials -NetworkLoginName $UserID -TasLoginName $UserID -PhoneNumber $PhoneNumber -EmployeeNumber $description -Email $aliasid -BranchId (Get-TdBranch -Name 'Test').id

But when doing the following:

Connect-TdService -url 'http://localhost' -Credential $TDCred -UserType operator
New-TdPerson -LastName 'Test' -BranchId (Get-TdBranch -Name 'Test').id

To Reproduce See above

Expected behavior n/a

Screenshots or Transcripts n/a

System Details

Additional context Add any other context about the problem here. Is there any other information like system configuration or data that might help us understand the problem.

whatthehomepod commented 5 years ago

??

AndrewPla commented 5 years ago

This is related to your TOPdesk permissions as the error message indicates. That response is coming from TOPdesk. Checkout the permissions on the account that you are using. See below for where I would start looking. image

whatthehomepod commented 5 years ago

Thank you for this one!