Closed SuperStark closed 1 year ago
Is this still maintained at all, just tried this to create a user, but it does nothing (getting data all works fine)
Code in VB.net:
Dim User As User = New User() With { .Firstname = Option_FirstName, .Lastname = Option_LastName, .Username = Option_SelectedEmail, .Email = Option_SelectedEmail, .Company = SnipeItApi.CompanyManager.Get("Some Company Ltd"), .Location = SnipeItApi.LocationManager.Get(Option_SelectedOffice & " Office"), .Password = "HelloHello1", .Activated = True } SnipeItApi.UserManager.Create(User)
For anyone with the same issue, after debugging it looks like the API wants a password confirmation Added this as a RequiredRequestHeader, works fine now.
Is this still maintained at all, just tried this to create a user, but it does nothing (getting data all works fine)
Code in VB.net:
Dim User As User = New User() With { .Firstname = Option_FirstName, .Lastname = Option_LastName, .Username = Option_SelectedEmail, .Email = Option_SelectedEmail, .Company = SnipeItApi.CompanyManager.Get("Some Company Ltd"), .Location = SnipeItApi.LocationManager.Get(Option_SelectedOffice & " Office"), .Password = "HelloHello1", .Activated = True } SnipeItApi.UserManager.Create(User)