---
title: "Authentication By Cert"
method: POST
path: "/ver2/AuthenticationService.svc/sessions/cert"
tags: ["Authentication"]
---

# Authentication By Cert

`POST /ver2/AuthenticationService.svc/sessions/cert`

## Request

- Base URL: `https://api.enviance.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.enviance.com/ver2/AuthenticationService.svc/sessions/cert`
- Auth: none declared
- TypeScript: <https://skmtc.dev/enviance/apis/restapi/docs/ver2/AuthenticationService.svc/sessions/cert/post.ts> (a function with typed inputs; its response is checked against the schema)

Authenticate By Certificate

Creates a new session by authenticating via encrypted username and certification id.

**Security:** All users.

**SDK API:**  `envianceSdk.authentication.authenticateByCert(encryptedUserName, certUniqueId, onsuccess, onerror)`

```
PATCH /ver2/AuthenticationService.svc/sessions HTTP/1.1
Content-Type: application/json; charset=UTF-8
 
{
  encryptedUserName: "username",
  certUniqueId: "abcd23456789",
}

```

## Headers

- `EnvApi-Systemid` string
- `EnvApi-Packageid` string
- `EnvApi-Udf-DateTime-Iso-In-CustomFields` string
- `EnvApi-Udf-DateTime-ReadInUserTz` string
- `EnvApi-Udf-Value-Invariant` string
- `EnvApi-Localization-All` string
- `x-client-request-id` string

## Request body

- EnvianceRestServicesVer2SecurityEncryptedCredentials: <!-- https://commonmark.org/help/ https://spec.commonmark.org/0.31.2/ --> # EncryptedCredentials Updates (and potentially moves) an existing Location object in the Compliance Model. Specifying a new parent path moves the Location underneath another parent Location. Updating the Custom Field Template of a Location object, if that object currently has no Template, adds the Template to the object. When switching from one Template to another Template, those values that belong to fields common to both Templates are kept, any values for fields not in the new Template are removed permanently. Setting the Template to null permanently removes all Custom Field values. This API does not support historical custom fields (those with Track Value History enabled). **Security:** User with permission to Compliance Objects. **SDK API:** `envianceSdk.compliance.updateLocation (locationIdOrPath, locationInfo, onsuccess, onerror)` **SDK API (async):** `envianceSdk.compliance.updateLocationAsync (locationIdOrPath, locationInfo, onsuccess, onerror)` ``` PATCH /ver2/ComplianceService.svc/locations/06cc9d1c-731b-4031-b471-de3336b0166d HTTP 1.1 Content-Type: application/json; charset=utf-8 { "locationInfo": { "name": "Toy Manufacturing", "fieldValues": [ {"name": "Aspect", "values": ["Air pollution control waste"]}, {"name": "Start Date", "values": ["2012-09-19T20:00:00"]}, {"name": "Type", "values": ["Spill", "Near Miss"]}, {"name": "Category", "values": ["Cat1", "Cat1.1", "Cat1.1.1"]} ], "documents": ["/Folder A/Document.doc"] } } //EXAMPLE with MOVE PATCH /ver2/ComplianceService.svc/locations/06cc9d1c-731b-4031-b471-de3336b0166d HTTP 1.1 Content-Type: application/json; charset=utf-8 { "locationInfo": { "name": "Toy Manufacturing", "parentPath": "/New Manufacturing Division/Toys/" } } ```
  - `encryptedUserName` string
  - `certUniqueId` string

## Response `default`

not available

- string, guid

---

[API](https://skmtc.dev/enviance/apis/restapi.md) - [All operations](https://skmtc.dev/enviance/apis/restapi/llms.txt) - [OpenAPI document](https://skmtc.dev/enviance/apis/restapi/revisions/45b2200a8cf2?raw)
