azureactivedirectory icon

azureactivedirectory

Azure Active Directory Client

COMMUNITYBEARER0 INSTALLS
OpenAPI Specificationv3.0
{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "Azure Active Directory Client.",
    "title": "azureactivedirectory",
    "version": "2017-04-01",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-ms-code-generation-settings": {
      "name": "azureactivedirectoryClient"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/azureactivedirectory/resource-manager/Microsoft.Aadiam/stable/2017-04-01/azureactivedirectory.json",
        "version": "2.0"
      }
    ],
    "x-providerName": "azure.com",
    "x-serviceName": "azureactivedirectory",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Azure Active Directory OAuth2 Flow",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "impersonate your user account"
      },
      "type": "oauth2"
    }
  },
  "security": [
    {
      "azure_auth": [
        "user_impersonation"
      ]
    }
  ],
  "parameters": {
    "ApiVersionParameter": {
      "description": "Client Api Version.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string"
    },
    "NameParameter": {
      "description": "The name of the diagnostic setting.",
      "in": "path",
      "name": "name",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    }
  },
  "paths": {
    "/providers/microsoft.aadiam/diagnosticSettings": {
      "get": {
        "description": "Gets the active diagnostic settings list for AadIam.",
        "operationId": "DiagnosticSettings_List",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful request to get more information about AadIam diagnostic settings",
            "schema": {
              "$ref": "#/definitions/DiagnosticSettingsResourceCollection"
            }
          },
          "default": {
            "description": "Error. Request for AadIam diagnostic settings has failed",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "DiagnosticSettings"
        ],
        "x-ms-examples": {
          "Gets the diagnostic settings": {
            "parameters": {
              "api-version": "2017-04-01-preview"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "providers/Microsoft.Aadiam/diagnosticSettings/mysetting",
                      "name": "mysetting",
                      "properties": {
                        "eventHubAuthorizationRuleId": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
                        "logs": [
                          {
                            "category": "SignInLogs",
                            "enabled": true,
                            "retentionPolicy": {
                              "days": 0,
                              "enabled": false
                            }
                          }
                        ],
                        "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
                        "workspaceId": ""
                      },
                      "type": ""
                    }
                  ]
                },
                "headers": {}
              }
            }
          }
        }
      }
    },
    "/providers/microsoft.aadiam/diagnosticSettings/{name}": {
      "delete": {
        "description": "Deletes existing diagnostic setting for AadIam.",
        "operationId": "DiagnosticSettings_Delete",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/NameParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful request to remove a diagnostic setting"
          },
          "204": {
            "description": "Successful request to remove a diagnostic setting"
          },
          "default": {
            "description": "Error. The request to delete named diagnostic setting has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "DiagnosticSettings"
        ],
        "x-ms-examples": {
          "Deletes the diagnostic setting": {
            "parameters": {
              "api-version": "2017-04-01",
              "name": "mysetting"
            },
            "responses": {
              "200": {},
              "204": {}
            }
          }
        }
      },
      "get": {
        "description": "Gets the active diagnostic setting for AadIam.",
        "operationId": "DiagnosticSettings_Get",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/NameParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful request to get more information about diagnostic setting",
            "schema": {
              "$ref": "#/definitions/DiagnosticSettingsResource"
            }
          },
          "default": {
            "description": "Error. Request for AadIam diagnostic setting has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "DiagnosticSettings"
        ],
        "x-ms-examples": {
          "Gets the diagnostic setting": {
            "parameters": {
              "api-version": "2017-04-01",
              "name": "mysetting"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "providers/microsoft.aadiam/diagnosticSettings/mysetting",
                  "name": "mysetting",
                  "properties": {
                    "eventHubAuthorizationRuleId": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
                    "logs": [
                      {
                        "category": "SignInLogs",
                        "enabled": true,
                        "retentionPolicy": {
                          "days": 0,
                          "enabled": false
                        }
                      }
                    ],
                    "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
                    "workspaceId": ""
                  },
                  "type": ""
                },
                "headers": {}
              }
            }
          }
        }
      },
      "put": {
        "description": "Creates or updates diagnostic settings for AadIam.",
        "operationId": "DiagnosticSettings_CreateOrUpdate",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "description": "Parameters supplied to the operation.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DiagnosticSettingsResource"
            }
          },
          {
            "$ref": "#/parameters/NameParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful request to create AadIam diagnostic setting.",
            "schema": {
              "$ref": "#/definitions/DiagnosticSettingsResource"
            }
          },
          "default": {
            "description": "Error. The request to create diagnostic setting has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "DiagnosticSettings"
        ],
        "x-ms-examples": {
          "BatchAccountDelete": {
            "parameters": {
              "api-version": "2017-04-01",
              "name": "mysetting",
              "parameters": {
                "id": "providers/microsoft.aadiam/diagnosticSettings/mysetting",
                "name": "mysetting",
                "properties": {
                  "eventHubAuthorizationRuleId": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
                  "eventHubName": "myeventhub",
                  "logs": [
                    {
                      "category": "AuditLogs",
                      "enabled": true,
                      "retentionPolicy": {
                        "days": 0,
                        "enabled": false
                      }
                    }
                  ],
                  "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
                  "workspaceId": ""
                },
                "type": ""
              }
            },
            "responses": {
              "200": {
                "body": {
                  "id": "providers/microsoft.aadiam/diagnosticSettings/mysetting",
                  "name": "mysetting",
                  "properties": {
                    "eventHubAuthorizationRuleId": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
                    "eventHubName": "myeventhub",
                    "logs": [
                      {
                        "category": "AuditLogs",
                        "enabled": true,
                        "retentionPolicy": {
                          "days": 0,
                          "enabled": false
                        }
                      }
                    ],
                    "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
                    "workspaceId": ""
                  },
                  "type": ""
                },
                "headers": {}
              }
            }
          }
        }
      }
    },
    "/providers/microsoft.aadiam/diagnosticSettingsCategories": {
      "get": {
        "description": "Lists the diagnostic settings categories for AadIam.",
        "operationId": "DiagnosticSettingsCategory_List",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful request to get list of diagnostic setting categories",
            "schema": {
              "$ref": "#/definitions/DiagnosticSettingsCategoryResourceCollection"
            }
          },
          "default": {
            "description": "Error. The request to view diagnostic setting categories has failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "DiagnosticSettingsCategories"
        ],
        "x-ms-examples": {
          "Gets the diagnostic setting categories": {
            "parameters": {
              "api-version": "2017-05-01-preview",
              "resourceUri": "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/providers/microsoft.insights/diagnosticSettingsCategories/WorkflowRuntime",
                      "name": "WorkflowRuntime",
                      "properties": {
                        "categoryType": "Logs"
                      },
                      "type": "microsoft.insights/diagnosticSettingsCategories"
                    }
                  ]
                },
                "headers": {}
              }
            }
          }
        }
      }
    },
    "/providers/microsoft.aadiam/operations": {
      "get": {
        "description": "Operation to return the list of available operations.",
        "operationId": "Operations_List",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful request to get list of AadIam operations.",
            "schema": {
              "$ref": "#/definitions/OperationsDiscoveryCollection"
            }
          },
          "default": {
            "description": "Error, failed to get list of AadIam operations.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "Operations"
        ],
        "x-ms-examples": {
          "Gets the operations": {
            "parameters": {
              "api-version": "2017-04-01"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "display": {
                        "description": "Reading a diagnostic setting categories",
                        "operation": "Diagnostic settings categories read",
                        "provider": "Microsoft Monitoring Insights",
                        "publisher": "Microsoft",
                        "resource": "Diagnostic settings categories"
                      },
                      "name": "microsoft.aadiam/diagnosticsettingscategories/read",
                      "properties": {}
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "DiagnosticSettings": {
      "description": "The diagnostic settings.",
      "properties": {
        "eventHubAuthorizationRuleId": {
          "description": "The resource Id for the event hub authorization rule.",
          "type": "string"
        },
        "eventHubName": {
          "description": "The name of the event hub. If none is specified, the default event hub will be selected.",
          "type": "string"
        },
        "logs": {
          "description": "The list of logs settings.",
          "items": {
            "$ref": "#/definitions/LogSettings"
          },
          "type": "array"
        },
        "serviceBusRuleId": {
          "description": "The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.",
          "type": "string"
        },
        "storageAccountId": {
          "description": "The resource ID of the storage account to which you would like to send Diagnostic Logs.",
          "type": "string"
        },
        "workspaceId": {
          "description": "The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2",
          "type": "string"
        }
      }
    },
    "DiagnosticSettingsCategory": {
      "description": "The diagnostic settings Category.",
      "properties": {
        "categoryType": {
          "description": "The type of the diagnostic settings category.",
          "enum": [
            "Logs"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "categoryType"
          },
          "x-nullable": false
        }
      }
    },
    "DiagnosticSettingsCategoryResource": {
      "allOf": [
        {
          "$ref": "#/definitions/ProxyOnlyResource"
        }
      ],
      "description": "The diagnostic settings category resource.",
      "properties": {
        "properties": {
          "$ref": "#/definitions/DiagnosticSettingsCategory",
          "description": "The properties of a Diagnostic Settings Category.",
          "x-ms-client-flatten": true
        }
      },
      "type": "object"
    },
    "DiagnosticSettingsCategoryResourceCollection": {
      "description": "Represents a collection of diagnostic setting category resources.",
      "properties": {
        "value": {
          "description": "The collection of diagnostic settings category resources.",
          "items": {
            "$ref": "#/definitions/DiagnosticSettingsCategoryResource"
          },
          "type": "array"
        }
      }
    },
    "DiagnosticSettingsResource": {
      "allOf": [
        {
          "$ref": "#/definitions/ProxyOnlyResource"
        }
      ],
      "description": "The diagnostic setting resource.",
      "properties": {
        "properties": {
          "$ref": "#/definitions/DiagnosticSettings",
          "description": "Properties of a Diagnostic Settings Resource.",
          "x-ms-client-flatten": true
        }
      },
      "type": "object"
    },
    "DiagnosticSettingsResourceCollection": {
      "description": "Represents a collection of alert rule resources.",
      "properties": {
        "value": {
          "description": "The collection of diagnostic settings resources.",
          "items": {
            "$ref": "#/definitions/DiagnosticSettingsResource"
          },
          "type": "array"
        }
      }
    },
    "Display": {
      "description": "Contains the localized display information for this particular operation / action. These value will be used by several clients for (1) custom role definitions for RBAC; (2) complex query filters for the event service; and (3) audit history / records for management operations.",
      "properties": {
        "description": {
          "description": "The description. The localized friendly description for the operation, as it should be shown to the user. It should be thorough, yet concise – it will be used in tool tips and detailed views. Prescriptive guidance for namespaces: Read any 'display.provider' resource Create or Update any 'display.provider' resource Delete any 'display.provider' resource Perform any other action on any 'display.provider' resource Prescriptive guidance for namespaces: Read any 'display.resource' Create or Update any 'display.resource' Delete any 'display.resource' 'ActionName' any 'display.resources'",
          "type": "string"
        },
        "operation": {
          "description": "The operation. The localized friendly name for the operation, as it should be shown to the user. It should be concise (to fit in drop downs) but clear (i.e. self-documenting). It should use Title Casing. Prescriptive guidance: Read Create or Update Delete 'ActionName'",
          "type": "string"
        },
        "provider": {
          "description": "The provider. The localized friendly form of the resource provider name – it is expected to also include the publisher/company responsible. It should use Title Casing and begin with \"Microsoft\" for 1st party services. e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute.\"",
          "type": "string"
        },
        "publisher": {
          "description": "The publisher. The localized friendly form of the resource publisher name.",
          "type": "string"
        },
        "resource": {
          "description": "The resource. The localized friendly form of the resource related to this action/operation – it should match the public documentation for the resource provider. It should use Title Casing. This value should be unique for a particular URL type (e.g. nested types should *not* reuse their parent’s display.resource field). e.g. \"Virtual Machines\" or \"Scheduler Job Collections\", or \"Virtual Machine VM Sizes\" or \"Scheduler Jobs\"",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ErrorDefinition": {
      "description": "Error definition.",
      "properties": {
        "code": {
          "description": "Service specific error code which serves as the substatus for the HTTP error code.",
          "readOnly": true,
          "type": "string"
        },
        "details": {
          "description": "Internal error details.",
          "items": {
            "$ref": "#/definitions/ErrorDefinition"
          },
          "readOnly": true,
          "type": "array"
        },
        "message": {
          "description": "Description of the error.",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "ErrorResponse": {
      "description": "Error response.",
      "properties": {
        "error": {
          "$ref": "#/definitions/ErrorDefinition",
          "description": "The error details."
        }
      }
    },
    "LogSettings": {
      "description": "Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log.",
      "properties": {
        "category": {
          "description": "Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.",
          "enum": [
            "AuditLogs",
            "SignInLogs"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "category"
          }
        },
        "enabled": {
          "description": "A value indicating whether this log is enabled.",
          "type": "boolean"
        },
        "retentionPolicy": {
          "$ref": "#/definitions/RetentionPolicy",
          "description": "The retention policy for this log."
        }
      },
      "required": [
        "enabled"
      ]
    },
    "OperationsDiscovery": {
      "description": "Operations discovery class.",
      "properties": {
        "display": {
          "$ref": "#/definitions/Display",
          "description": "Object type"
        },
        "name": {
          "description": "Name of the API. The name of the operation being performed on this particular object. It should match the action name that appears in RBAC / the event service. Examples of operations include: * Microsoft.Compute/virtualMachine/capture/action * Microsoft.Compute/virtualMachine/restart/action * Microsoft.Compute/virtualMachine/write * Microsoft.Compute/virtualMachine/read * Microsoft.Compute/virtualMachine/delete Each action should include, in order: (1) Resource Provider Namespace (2) Type hierarchy for which the action applies (e.g. server/databases for a SQL Azure database) (3) Read, Write, Action or Delete indicating which type applies. If it is a PUT/PATCH on a collection or named value, Write should be used. If it is a GET, Read should be used. If it is a DELETE, Delete should be used. If it is a POST, Action should be used.",
          "type": "string"
        },
        "origin": {
          "description": "Origin. The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX. Default value is \"user,system\"",
          "type": "string"
        },
        "properties": {
          "$ref": "#/definitions/OperationsDiscoveryProperties",
          "description": "Properties. Reserved for future use."
        }
      },
      "type": "object"
    },
    "OperationsDiscoveryCollection": {
      "description": "Collection of ClientDiscovery details.",
      "properties": {
        "value": {
          "description": "The ClientDiscovery details.",
          "items": {
            "$ref": "#/definitions/OperationsDiscovery"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "OperationsDiscoveryProperties": {
      "description": "ClientDiscovery properties.",
      "properties": {},
      "type": "object"
    },
    "ProxyOnlyResource": {
      "description": "A proxy only azure resource object.",
      "properties": {
        "id": {
          "description": "Azure resource Id",
          "readOnly": true,
          "type": "string"
        },
        "name": {
          "description": "Azure resource name",
          "readOnly": true,
          "type": "string"
        },
        "type": {
          "description": "Azure resource type",
          "readOnly": true,
          "type": "string"
        }
      },
      "x-ms-azure-resource": true
    },
    "RetentionPolicy": {
      "description": "Specifies the retention policy for the log.",
      "properties": {
        "days": {
          "description": "The number of days for the retention in days. A value of 0 will retain the events indefinitely.",
          "format": "int32",
          "minimum": 0,
          "type": "integer"
        },
        "enabled": {
          "description": "A value indicating whether the retention policy is enabled.",
          "type": "boolean"
        }
      },
      "required": [
        "enabled",
        "days"
      ]
    }
  }
}