Skip to content
This repository was archived by the owner on Dec 8, 2025. It is now read-only.
This repository was archived by the owner on Dec 8, 2025. It is now read-only.

New-SnipeITuser returns 422 #287

Description

@cphillipsWSL

Context

I am Trying to create a new user in snipe-it via New-SnipeITUSer

Your Environment

  • SnipitPS Module version used: 1.10.227
  • Operating System and PowerShell version: Windows 10, PS 5
  • Snipe It version: v6.0.10 build 8673 (gc6cbf3712)

Expected Behavior

New-snipeituser should create a new user when the mandatory fields are filled out (First name, Last Name & UserName)

Current Behavior

When running new-snipeituser without attributes, it prompts for FN, LN and UN. After completing those fields the following error happens.
When running new-snipeituser with attributes -first_name "test" -last_name "tester" -username "ttester" the same error happens

IsMutuallyAuthenticated : False
Cookies : {worldsurfleague_snipeitv6_session=gdOZUqYgXJWUGeruiuXyG5tdA1NG
RiyGRRXwL4fu}
Headers : {Transfer-Encoding, Connection, X-RateLimit-Limit,
X-RateLimit-Remaining...}
SupportsHeaders : True
ContentLength : -1
ContentEncoding :
ContentType : application/json
CharacterSet :
Server : nginx
LastModified : 9/29/2022 9:46:16 AM
StatusCode : 422
StatusDescription : Unprocessable Content
ProtocolVersion : 1.1
ResponseUri : https://worldsurfleague.snipe-it.io/api/v1/users
Method : POST
IsFromCache : False

Possible Solution

Steps to Reproduce (for bugs)

  1. new-snipeituser -first_name "test" -last_name "tester" -username "ttester"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions