Create Application

Use this API to create a new Application.

Prerequisites

The following scopes are required to execute this API: Directory.AccessAsUser.All

HTTP request

POST /applications

Request headers

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

Request body

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

Response

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

Example

Request

Here is an example of the request.

POST https://graph.microsoft.com/beta/applications
Content-type: application/json
Content-length: 717

{
  "addIns": [
      {
        "id": "id-value",
        "type": "type-value",
        "properties": [
          {
            "key": "key-value",
            "value": "value-value"
          }
        ]
      }
    ],
    "appRoles": [
      {
        "allowedMemberTypes": [
          "allowedMemberTypes-value"
        ],
        "description": "description-value",
        "displayName": "displayName-value",
        "id": "id-value",
        "isEnabled": true,
        "origin": "origin-value",
        "value": "value-value"
      }
    ],
    "availableToOtherOrganizations": true,
    "displayName": "displayName-value",
    "errorUrl": "errorUrl-value"
}

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

Response

Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json
Content-length: 717

{
  "application": {
    "addIns": [
      {
        "id": "id-value",
        "type": "type-value",
        "properties": [
          {
            "key": "key-value",
            "value": "value-value"
          }
        ]
      }
    ],
    "appId": "appId-value",
    "appRoles": [
      {
        "allowedMemberTypes": [
          "allowedMemberTypes-value"
        ],
        "description": "description-value",
        "displayName": "displayName-value",
        "id": "id-value",
        "isEnabled": true,
        "origin": "origin-value",
        "value": "value-value"
      }
    ],
    "availableToOtherOrganizations": true,
    "displayName": "displayName-value",
    "errorUrl": "errorUrl-value"
  }
}