
jason.curtis (Community Member) asked a question.
I am in the process of upgrading some automation and moving away from the XML api's. I am trying to just create a user with the Identity API and using the example I keep getting Internal Server error. This is for a regular user, but a saml user.
http --auth-type=veracode_hmac POST "https://api.veracode.com/api/authn/v2/users" < input.json
The API passes the JSON file that you populate with the necessary values as shown in this example:
{
"email_address": "example@example.com",
"first_name": "Example",
"last_name": "User",
"ipRestricted": false,
"active": true,
"roles": [
{
"role_name": "extseclead"
},
{
"role_name": "extsubmitanyscan"
}
],
"title": "Sample",
"user_name": "example@example.com",
"userType": "VOSP"
}
Are there more properties required to be successful?
Please let me know ASAP.. thanks
.png)
Hello @jason.curtis (Community Member) ,
For this type of question, I would recommend you contact our technical support team. Here's how you can log a case:
They will be able to help you with this question.
Jason
Community Support Engineer
I have done that last week but no response as of yet and I do have the proper roles
Hi @jason.curtis, Just to cover the basics, did you check that your account has the correct roles and HMAC is configured: https://help.veracode.com/go/c_identity_intro
@jason.curtis (Community Member), I'm having this exact same experience. Were you able to get any assistance from your support case?
I worked with support on this very same issue. Despite the error message from an invalid request indicating that the only required parameters are 'first_', 'last_', and 'user_name' plus 'email_address', sending a request without the 'roles' section is what causes the 500 error.
Additionally, some roles carry additional restrictions that require sending a 'teams' section. Fortunately, a 400 error will clarify this for users.
And finally, sending a request without 'active' set to true will create a user, but one won't be able to find it on the platform via the Administration area.
Thus, the absolute minimum set of parameters for a regular user is:
{
"email_address": "name@domain.tld",
"first_name": "first",
"last_name": "last",
"user_name": "name@domain.tld",
"roles": [
{
"role_name": "as needed"
}
],
"teams": [
{
"team_name": "as required"
}
],
"active": true
}
And the absolute minimum set of parameters for a SAML user is:
{
"email_address": "name@domain.tld",
"first_name": "first",
"last_name": "last",
"user_name": "user",
"roles": [
{
"role_name": "as needed"
}
],
"teams": [
{
"team_name": "as required"
}
],
"active": true,
"saml_user": true,
"saml_subject": "name@domain.tld"
}