CreateUser
/20160918/users
Specify a name for the user, which must be unique across all users in your tenancy and cannot be changed. Allowed characters are letters, numerals, hyphens, periods, underscores, +, and @. The space characer is not allowed. If you specify a name that is already in use, you will receive a 409 error. This name will be the user's login to the Compute Web UI. You might want to choose a name that your company's own identity system (for example, Active Directory, LDAP, etc.) already uses. You can delete a user and then create a new user with the same name because they will have different OCIDs.
You must specify a description for the user, although it can be an empty string. You can use the field to provide the user's full name, a description, a nickname, or other information to identify the user.
After you send your request, the new object's lifecycleState will temporarily be CREATING. Before using the object, make sure its lifecycleState has changed to ACTIVE.
A new user has no permissions until you place the user in one or more groups. See AddUserToGroup. Inform the new user which compartment(s) they have access to.
If the user needs to access the Compute Web UI, you need to provide the user with a password. See CreateOrResetUIPassword.
If the user needs to access the REST API, you need to upload a public API signing key for the user.
Request
- application/json
-
opc-retry-token: string
Minimum Length:
1
Maximum Length:64
A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
object
-
compartmentId(required):
string
The OCID of the tenancy containing the user.
-
definedTags:
object definedTags
Additional Properties Allowed: additionalPropertiesDefined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"Operations": {"CostCenter": "42"}}
-
description(required):
string
Minimum Length:
1
Maximum Length:400
The description you assign to the user during creation. Does not need to be unique, and it is changeable. (For tenancies that support identity domains) You can have an empty description. -
email:
string
Minimum Length:
0
Maximum Length:254
The email you assign to the user during creation. The email must be unique across all users in the tenancy. (For tenancies that support identity domains) You must provide an email for each user. -
freeformTags:
object freeformTags
Additional Properties Allowed: additionalPropertiesFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
-
name(required):
string
Minimum Length:
1
Maximum Length:100
The name you assign to the user during creation. This is the user's login for the Compute Web UI. The name must be unique across all users in the tenancy and cannot be changed.
object
-
object additionalProperties
Additional Properties Allowed: additionalPropertiesKey-value pair representing a defined tag key and value, scoped to a namespace. Example: {"CostCenter": "42"}
object
object
-
object additionalProperties
The value of the tag. Only the String type is supported.
object
Response
- application/json
200 Response
-
etag: string
For optimistic concurrency control. See if-match.
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
capabilities:
object UserCapabilities
Properties indicating how the user is allowed to authenticate.
-
compartmentId(required):
string
The OCID of the tenancy containing the user.
-
dbUserName:
string
Minimum Length:
0
Maximum Length:201
DB username of the DB credential. Has to be unique across the tenancy. -
definedTags:
object definedTags
Additional Properties Allowed: additionalPropertiesDefined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"Operations": {"CostCenter": "42"}}
-
description(required):
string
Minimum Length:
1
Maximum Length:400
The description you assign to the user. Does not need to be unique, and it is changeable. (For tenancies that support identity domains) You can have an empty description. -
email:
string
Minimum Length:
0
Maximum Length:254
The email address you assign to the user. The email address must be unique across all users in the tenancy. (For tenancies that support identity domains) The email address is required unless the requirement is disabled at the tenancy level. -
emailVerified:
boolean
Whether the email address has been validated.
-
externalIdentifier:
string
Identifier of the user in the identity provider
-
freeformTags:
object freeformTags
Additional Properties Allowed: additionalPropertiesFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
-
id(required):
string
The OCID of the user.
-
identityProviderId:
string
The OCID of the IdentityProvider this user belongs to.
-
inactiveStatus:
integer(int64)
Returned only if the user's lifecycleState is INACTIVE. A 16-bit value showing the reason why the user is inactive: - bit 0: SUSPENDED (reserved for future use) - bit 1: DISABLED (reserved for future use) - bit 2: BLOCKED (the user has exceeded the maximum number of failed login attempts for the Compute Web UI)
-
isMfaActivated(required):
boolean
Flag indicates if MFA has been activated for the user.
-
lastSuccessfulLoginTime:
string(date-time)
The date and time of when the user most recently logged in the format defined by RFC3339 (ex. 2016-08-25T21:10:29.600Z). If there is no login history, this field is null. For illustrative purposes, suppose we have a user who has logged in at July 1st, 2020 at 1200 PST and logged out 30 minutes later. They then login again on July 2nd, 2020 at 1500 PST. Their previousSuccessfulLoginTime would be 2020-07-01:19:00.000Z. Their lastSuccessfulLoginTime would be 2020-07-02:22:00.000Z.
-
lifecycleState(required):
string
Minimum Length:
1
Maximum Length:64
Allowed Values:[ "CREATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED" ]
The user's current state. After creating a user, make sure its lifecycleState changes from CREATING to ACTIVE before using it. -
name(required):
string
Minimum Length:
1
Maximum Length:100
The name you assign to the user during creation. This is the user's login for the Compute Web UI. The name must be unique across all users in the tenancy and cannot be changed. -
previousSuccessfulLoginTime:
string(date-time)
The date and time of when the user most recently logged in the format defined by RFC3339 (ex. 2016-08-25T21:10:29.600Z). If there is no login history, this field is null. For illustrative purposes, suppose we have a user who has logged in at July 1st, 2020 at 1200 PST and logged out 30 minutes later. They then login again on July 2nd, 2020 at 1500 PST. Their previousSuccessfulLoginTime would be 2020-07-01:19:00.000Z. Their lastSuccessfulLoginTime would be 2020-07-02:22:00.000Z.
-
timeCreated(required):
string(date-time)
Date and time the user was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
-
userSupportAccounts:
object SupportAccounts
The support accounts that an OCI user can links to. An OCI user may links to different SupportAccounts from different support provider. The OCI user can only link to one support account from a a particular support provider.
object
-
canUseApiKeys:
boolean
Indicates if the user can use API keys.
-
canUseAuthTokens:
boolean
Indicates if the user can use SWIFT passwords / auth tokens.
-
canUseConsolePassword:
boolean
Indicates if the user can log in to the Compute Web UI.
-
canUseCustomerSecretKeys:
boolean
Indicates if the user can use SigV4 symmetric keys.
-
canUseDbCredentials:
boolean
Indicates if the user can use DB passwords.
-
canUseOAuth2ClientCredentials:
boolean
Indicates if the user can use OAuth2 credentials and tokens.
-
canUseSmtpCredentials:
boolean
Indicates if the user can use SMTP passwords.
object
-
object additionalProperties
Additional Properties Allowed: additionalPropertiesKey-value pair representing a defined tag key and value, scoped to a namespace. Example: {"CostCenter": "42"}
object
object
-
mos:
object MosSupportAccount
Derived object from SupportAccount. The support provider is MOS
object
-
object additionalProperties
The value of the tag. Only the String type is supported.
object
object
-
object
SupportAccount
Discriminator:
supportProvider
This is the base object indicating who is the support provider, and what is the userId within the support provider. -
object
supportProvider
-
supportProvider(required):
string
Allowed Values:
[ "MOS" ]
The name of the support provider. -
supportUserID(required):
string
The userID used within a support provider.
{ "id": "ocid1.user.aaaaaaaaqvrabwexampleuniqueID", "compartmentId": "ocid1.tenancy.aaaaaaaaba3pvexampleuniqueID", "name": "JohnSmith@example.com", "description": "John Smith", "lifecycleState": "ACTIVE", "timeCreated": "2016-11-18T18:13:12.210Z" }
400 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
403 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
404 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
409 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
429 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
500 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
Default Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload