Generate Activation Code

Generate activation code for the Privilege Manager client.

HTTP Request

POST /generateActivationCode

Request headers

HeaderValue
AuthorizationIf required by Recast Agent Gateway configuration
KeyAuthentication key if required by Recast Agent Gateway configuration. Key can be passed also as a URI parameter (like: /computerManagedGroupRules?Key=configuredkey)
Acceptapplication/json

Request Parameters

Following table shows the parameters available for the request.

ParameterTypeDescription
KeystringOptional. Authentication key if required by Recast Agent Gateway configuration. Can be passed also as a request header

Request Body

In the request body, supply a JSON representation for generating activation code. Following table shows the properties that are required or available when you generate activation code.

PropertyTypeDescription
ComputerNamestringNETBIOS name of the computer where activation code needs to be created.
ComputerDomainstring
Domain name of the computer where activation code needs to created:
  • Active Directory joined (including hybrid): DNS name of the Active Directory domain
  • Azure Active Directory joined: AAD directory (tenant ) ID
  • Workgroup computer: WORKGROUP
AADDeviceIdstringDevice ID of Azure Active Directory joined device. Required only for AAD joined devices that are used AAD targeted Recast Privilege Manager management rules.
UserNamestringUser account name for account that has permissions to create activation codes for the computer.
UserDomainstringDomain name of the account that has permissions to create activation codes for the computer:
  • Active Directory and synced Azure Active Directory accounts: DNS or NETBIOS name of the Active Directory domain
  • Native Azure Active Directory accounts: AzureAD
ValidityTimeIndexintValidaty time index value that is allowed for the account specified in UserName field. Must be a value that is configured on Self service configuration.
ReasonstringReason why activation code is needed.
TemporaryAccountNamestringName of the local temporary account to be activated.

Response

If successful, this method returns a 200 OK response code and a activation code in the response body.

Example

Request

Here is an example of the request.

POST https://cgw.dns.domain/api/v1.0/generateActivationCode
Content-Type: application/json
{
    "ComputerName": "CENL02",
    "ComputerDomain": "domain.ad",
    "UserName": "serviceaccount",
    "UserDomain": "domain.ad",
    "ValidityTimeIndex": 1,
    "Reason": "Printer driver installation",
    "TemporaryAccountName": "tempadmin"
}

Response

HTTP/1.1 200 OK
Content-Type: application/json
"12341234123412341234"
Copyright © 2023 Recast Software, LLC. All rights reserved.