Create programControl (deprecated)

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Caution

This version of the access review API is deprecated and will stop returning data on May 19, 2023. Please use access reviews API.

In the Azure AD access reviews feature, create a new programControl object. This links an access review to a program.

Prior to making this request, the caller must have previously

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) ProgramControl.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application ProgramControl.ReadWrite.All

The signed in user must also be in a directory role that permits them to create a programControl.

HTTP request

POST /programControls

Request headers

Name Type Description
Authorization string Bearer {token}. Required.

Request body

In the request body, supply a JSON representation of a programControl object.

The following table shows the properties that are required when you create a program control.

Property Type Description
programId String The programId of the program this control is going to become a part of.
controlId String The controlId of the control, in particular the identifier of an access review.
controlTypeId String The programControlType identifies the type of program control - for example, a control linking to guest access reviews.

Response

If successful, this method returns a 201, Created response code and a programControl object in the response body.

Example

Request

In the request body, supply a JSON representation of the programControl object.

POST https://graph.microsoft.com/beta/programControls
Content-type: application/json

{
    "controlId": "7e59d237-2fb0-4e5d-b7bb-d4f9f9129213",
    "controlTypeId": "6e4f3d20-c5c3-407f-9695-8460952bcc68",
    "programId": "7e59d237-2fb0-4e5d-b7bb-d4f9f9129213"
}
Response

Note: The response object shown here might be shortened for readability.

HTTP/1.1 201 Created
Content-type: application/json

{
  "id": "63b2302c-7e62-43b7-aefb-063ba5bdb853",
  "controlId": "7e59d237-2fb0-4e5d-b7bb-d4f9f9129213",
  "programId": "7e59d237-2fb0-4e5d-b7bb-d4f9f9129213",
  "controlTypeId": "6e4f3d20-c5c3-407f-9695-8460952bcc68",
  "displayName": "test",
  "status": "Active",
  "createdDateTime": "2018-05-18T20:26:05.2976279Z"
}

See also

Method Return Type Description
List programControlTypes programControlType collection List program control types.