Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't checkout accessory #307

Open
OWA-dbell opened this issue Nov 6, 2024 · 1 comment
Open

Can't checkout accessory #307

OWA-dbell opened this issue Nov 6, 2024 · 1 comment

Comments

@OWA-dbell
Copy link

Context

I'm trying to checkout accessories to a user and getting an error.

set-snipeitaccessoryowner -id <accessory id> -assigned_to <user id>

Your Environment

  • SnipitPS Module version used: 1.10.227
  • Operating System and PowerShell version: Windows 11, PS 5.1
  • Snipe It version: v7.0.13 build 15514

Expected Behavior

Check the asset out to the user specified.

Current Behavior

The error below:

> set-snipeitaccessoryowner -id 1 -assigned_to 1
Invoke-SnipeitMethod :
assigned_user                                                                                      assigned_asset                                                                                     assigned_location
-------------                                                                                      --------------                                                                                     -----------------
{The assigned user field is required when none of assigned asset / assigned location are present.} {The assigned asset field is required when none of assigned user / assigned location are present.} {The assigned location field is req...
At C:\Program Files\WindowsPowerShell\Modules\SnipeitPS\1.10.227\Public\Set-SnipeitAccessoryOwner.ps1:69 char:27
+                 $result = Invoke-SnipeitMethod @Parameters
+                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-SnipeitMethod
@OWA-dbell
Copy link
Author

-verbose messages:

VERBOSE: Performing the operation "Set-SnipeitAccessoryOwner" on target "ShouldProcess?".
VERBOSE: [Invoke-SnipeitMethod] Invoking method POST to URI
VERBOSE: POST with -1-byte payload
VERBOSE: received -1-byte response of content type application/json
VERBOSE: [Invoke-SnipeitMethod] Status code:
VERBOSE: @{status=error; messages=; payload=}
VERBOSE: [Invoke-SnipeitMethod] An error response was received ... resolving
Invoke-SnipeitMethod :
assigned_user                                                                                      assigned_asset                                                                                     assigned_location
-------------                                                                                      --------------                                                                                     -----------------
{The assigned user field is required when none of assigned asset / assigned location are present.} {The assigned asset field is required when none of assigned user / assigned location are present.} {The assigned location field is req...
At C:\Program Files\WindowsPowerShell\Modules\SnipeitPS\1.10.227\Public\Set-SnipeitAccessoryOwner.ps1:69 char:27
+                 $result = Invoke-SnipeitMethod @Parameters
+                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-SnipeitMethod

VERBOSE: [Invoke-SnipeitMethod] Function ended

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant