Skip to content

API Authentication

ProvEn 2.0 offers a REST API that should be preferred for all new requests, as well as several other job-related operations. The API is secured with OAuth2 and requires a valid Entra ID token.

The token must be obtained against an app registration that includes the ProvEn 2.0 API roles in its API permissions. This means the main app registrations cannot be used.

Within Core’s tenant, app registrations have been created for this purpose. In other tenants, an app registration will need to be created and permissions added/consented.

img.png

Authentication details vary depending on the app registration and target tenant, but example parameters are included below for the development environment.

These parameters can be fed into an HTTP client such as Postman, Insomnia or Hoppscotch to generate a valid token.

ParameterExpected valueExample value
Grant typeA suitable method depending on the use-caseclient_credentials
Authorization endpointToken endpoint for the target tenanthttps://login.microsoftonline.com/b711a074-37c7-459d-9e4b-3968a9fb384d/oauth2/v2.0/token
Client IDApp ID of the API app registration.27267ce8-ed81-4354-94d9-ea685862ff9c
Client secretSecret value created on the app registration<redacted>
ScopesScope for the target environmentapi://ProvEn2_dev/.default
Client authorizationSend credentials in body
Pass byHeaders

The token must be included with every request as the Authorization header in the Bearer format.