---
title: "CHG IdentityProvider API v1"
url: "https://developer.tesma.com/apis/idp-public-api-2/versions/3a3d30d9-10e8-4c7b-9457-d1f146a3a3fe"
---

# CHG IdentityProvider API v1

OpenAPI specification document.

````json
{"components":{"schemas":{"ProblemDetails":{"additionalProperties":{},"properties":{"detail":{"type":["null","string"]},"instance":{"type":["null","string"]},"status":{"format":"int32","type":["null","integer"]},"title":{"type":["null","string"]},"type":{"type":["null","string"]}},"type":"object"},"RequestUserInviteViewModelV3":{"additionalProperties":false,"properties":{"clientId":{"description":"Optional Id of the requesting client for templating and redirection uri after completed invite","type":["null","string"]}},"type":"object"},"User":{"additionalProperties":false,"properties":{"claims":{"items":{"$ref":"#/components/schemas/UserClaim"},"type":["null","array"]},"email":{"type":["null","string"]},"emailConfirmed":{"type":"boolean"},"firstName":{"type":["null","string"]},"id":{"type":["null","string"]},"isBlocked":{"type":"boolean"},"isDeleted":{"type":"boolean"},"lastName":{"type":["null","string"]},"lockoutEnd":{"format":"date-time","type":["null","string"]},"phoneNumber":{"type":["null","string"]},"roles":{"items":{"$ref":"#/components/schemas/UserRole"},"type":["null","array"]},"userName":{"type":["null","string"]}},"type":"object"},"UserClaim":{"additionalProperties":false,"properties":{"claimType":{"type":["null","string"]},"value":{"type":["null","string"]},"valueType":{"type":["null","string"]}},"type":"object"},"UserCreationRequestModel":{"additionalProperties":false,"description":"Model to create a new user","properties":{"email":{"description":"Email of the new user","format":"email","minLength":1,"type":"string"},"firstName":{"type":["null","string"]},"lastName":{"type":["null","string"]},"userName":{"type":["null","string"]}},"required":["email"],"type":"object"},"UserInvitationResult":{"additionalProperties":false,"properties":{"completeInviteUrl":{"description":"Url for the user to complete the invite and set account details","type":["null","string"]},"email":{"description":"Email address of the user to send the invitation link to.","type":["null","string"]},"userName":{"description":"Name of the user for whom the invite was created","type":["null","string"]}},"type":"object"},"UserLoginProvider":{"additionalProperties":false,"description":"Represents a login and its associated provider for a user.","properties":{"loginProvider":{"type":["null","string"]},"providerDisplayName":{"type":["null","string"]},"providerKey":{"type":["null","string"]}},"type":"object"},"UserRole":{"additionalProperties":false,"properties":{"description":{"type":["null","string"]},"id":{"type":["null","string"]},"name":{"type":["null","string"]}},"type":"object"},"UserUpdateRequestModel":{"additionalProperties":false,"description":"Model to update a new user","properties":{"email":{"description":"Email of the new user","format":"email","minLength":1,"type":"string"},"firstName":{"type":["null","string"]},"lastName":{"type":["null","string"]},"userName":{"type":["null","string"]}},"required":["email"],"type":"object"}},"securitySchemes":{"oauth2":{"description":"Standard Authorization header using the Bearer scheme. Example: \"bearer {token}\"","in":"header","name":"Authorization","type":"apiKey"}}},"info":{"description":"## Authentication\n\nA valid access token is required to try out these endpoints below. Please create a token using Postman and a valid client configuration or retrieve a new token from the token endpoint described [here](/.well-known/openid-configuration).\n\n## Caution\n\nDeprecated api endpoints will be removed **one year** after the deprecation was announced/new api version was published.\n\n## Errors\n\nThis API uses conventional HTTP response codes to indicate the success or failure of an API request. \nIn general: Codes in the `2xx` range indicate success. Codes in the `4xx` range indicate an error that failed given the information provided (e.g., a required parameter was omitted, an user was not found, etc.). \nCodes in the `5xx` range indicate an error with the API servers (these are rare).\n\nErrors will be returned as [Problem details](https://tools.ietf.org/html/rfc7807). This means:\n- A [HTTP status code](https://tools.ietf.org/html/rfc7231#section-6.1) is returned in the HTTP response header\n- Error responses will be of the Content-Type application/problem, appending a serialization format of either json or xml: `application/problem+json`, `application/problem+xml`\n- Error responses will have each of the following keys:\n \n - `type` (string): A URL to a document describing the error condition (optional, and \"about:blank\" is assumed if none is provided; should resolve to a human-readable document).\n - `title` (string): A short, human-readable title for the general error type.\n - `status` (number): Conveying of the HTTP status code so that all information is in one place.\n - `detail` (string): An optional human-readable description of the specific error.\n\nExamples:\n```json\n{\n    \"type\": \"https://httpstatuses.com/401\",\n    \"title\": \"Unauthorized\",\n    \"status\": 401\n}\n```\n\nValidation errors, like invalid parameters, describes each error in an object array called `errors` with following properties:\n            \n- `message` (string): a human readable error description\n- `errorCode` (number): An optional custom defined unique addressable id of this type of error. This is important that machines/code can react on this type of error.\n- `source` (string): The property or object of the error. This property should belong to the request object.\n\n```json\n{\n    \"type\": \"https://tools.ietf.org/html/rfc7231#section-6.5.1\",\n\t\"title\": \"One or more validation errors occurred.\",\n\t\"status\": 400,\n\t\"traceId\": \"|20cd3843-4b3a2f6ccb6993ea.\",\n\t\"errors\": [\n\t\t{\n\t\t\t\"source\": \"UserId\"\t\t\n\t\t\t\"message\": \"Invalid user '1234'.\"\n\t\t\t\"errorCode\": 123\n\t\t}\n\t]\n}\n```","title":"CHG IdentityProvider API v1","version":"2.3.44.0"},"openapi":"3.1.1","paths":{"/api/v1/users/{id}":{"get":{"description":"This endpoint provides access to retrieve user information.","parameters":[{"description":"The unique user id or user name","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"claims":[{"claimType":"is_chg_employee","value":"true","valueType":"String"},{"claimType":"AzureOID","value":"12313","valueType":"String"}],"email":"peter.test@chg-meridian.com","emailConfirmed":true,"firstName":"Peter","id":"C11977A4-B9DD-449D-BA5C-446C79A32CD1","isBlocked":false,"isDeleted":false,"lastName":"Test","lockoutEnd":null,"phoneNumber":null,"roles":[{"description":"QA Manager","id":"5CCE5D79-005A-45BD-A1F4-D6F1BE11DF68","name":"TestManager"}],"userName":"peter.test@chg-meridian.com"},"schema":{"$ref":"#/components/schemas/User"}}},"description":"OK"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}},"description":"Not Found"}},"security":[{"oauth2":["IdentityProviderOrUserApi"]}],"summary":"Retrieves a user object by the given id. (Auth scopes: identityprovider_service_api, identityprovider_users_api)","tags":["Users"]}},"/api/v1/users/{id}/logins":{"get":{"description":"This endpoint provides access to retrieve user information.","parameters":[{"description":"The unique user id or user name","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserLoginProvider"},"type":"array"}}},"description":"OK"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}},"description":"Not Found"}},"security":[{"oauth2":["IdentityProviderOrUserApi"]}],"summary":"Retrieves the logins (login providers) used for a user (Auth scopes: identityprovider_service_api, identityprovider_users_api)","tags":["Users"]}}},"security":[{"oauth2":[]}]}
````
