# Integrate Azure API with Google SecOps

This document explains how to integrate Azure API with Google Security Operations.

## Use cases

The **Azure API** integration uses Google SecOps
capabilities to support the following use cases:

- **Universal Microsoft 365 investigation**: Use the custom HTTP request
  capability to query any Microsoft Graph endpoint, allowing analysts to gather
  data across Teams, SharePoint, and Exchange from a single interface.

- **Custom incident remediation**: Execute targeted POST or PATCH requests to
  remediate threats in Azure services when a dedicated "one-click" action is not
  available, ensuring rapid response to emerging vulnerabilities.

- **Automated data ingestion**: Perform scheduled ingestion of security events
  and audit logs from various Azure repositories to maintain comprehensive
  visibility over the cloud environment.

- **Secure malware handling**: Safely download and analyze suspicious files by
  using the built-in password-protected ZIP archiving feature, which prevents
  accidental execution of malicious content.

- **Persistent authentication management** : Use the
  [Refresh Token Renewal Job](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#refresh-token-renewal) to automatically rotate
  OAuth 2.0 tokens, ensuring that automated playbooks and hunting jobs maintain
  uninterrupted, secure access to Microsoft 365 services.

## Before you begin

Before you configure the integration in Google SecOps, verify
that you have the following:

- **Microsoft Entra ID application**: An application registered in the Microsoft
  Entra ID portal to facilitate API communication.

- **Client ID and client secret**: Valid credentials generated from your
  application registration.

- **Tenant ID**: The unique identifier of your Azure Active Directory instance.

- **Redirect URL**: A configured Redirect URI that matches the one provided in
  the integration parameters.

- **[API permissions (scopes)](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#azure-api-authentication-setup)**: The specific
  permissions assigned to your application based on the Azure services you intend
  to query.

- **[Refresh token](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#establish-delegated-authentication)**: A token valid for 90
  days required for persistent delegated access.

- **[Refresh Token Renewal Job](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#configure-refresh-token-renewal)**: A critical
  security automation used to prevent integration failure due to token expiration.

### Azure API authentication setup

The Azure API integration supports two types of authentication. The set of
permissions required depends on the specific API requests and Azure services you
query.

- **Application permissions**: API requests are executed from the perspective of
  the application configured in Microsoft Entra ID. This setup only requires a
  client ID and client Secret.

- **Delegated permissions**: API requests are executed on behalf of a specific
  user for whom impersonation is configured.

### Establish delegated authentication

To use delegated permissions, you must manually generate an initial refresh
token using the following steps:

1. Provide the `Client ID`, `Client Secret`, `Scope`, `Redirect URL`, and
   `Tenant ID` in the integration configuration.

2. Run the [**Get Authorization**](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#get-authorization) action.

3. Open the link generated by the action in a browser and copy
   the resulting redirected link.

4. Provide the redirected link as an input to the
   [**Generate Token**](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#generate-token) action.

5. Copy the token returned by the action and enter it into `Refresh Token`
   during integration configuration.

### Configure refresh token renewal

The initial refresh token is valid for 90 days. To ensure uninterrupted service,
configure the [Refresh Token Renewal Job](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#refresh-token-renewal) to
automatically update the refresh token for the integration instance.

## Integration parameters

The **Azure API** integration requires the following parameters:

| Parameter | Description |
|---|---|
| `Microsoft Login API Root` | Required. The API root of the Microsoft identity platform login service used for Azure API authentication. The default value is `https://login.microsoftonline.com`. |
| `Microsoft Graph API Root` | Required. The API root of the Microsoft Graph service used for Azure API operations. The default value is `https://graph.microsoft.com`. |
| `Client ID` | Required. The client ID for the Azure API account. |
| `Client Secret` | Required. The client secret for the Azure API account. |
| `Tenant ID` | Required. The tenant ID for the Azure API account. |
| `Refresh Token` | Optional. The refresh token used for delegated access to the Azure API account. This token is valid for 90 days and is obtained in the [initial setup.](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#establish-delegated-authentication) |
| `Verify SSL` | Optional. If selected, the integration validates the SSL certificate when connecting to the Azure API server. Enabled by default. |
| `Redirect URL` | Optional. The redirect URI associated with the Microsoft Entra ID application. The default value is `http://localhost`. |
| `Test URL` | Required. The URL used to validate the authentication to Azure API using a GET request. |
| `Scopes` | Required. A comma-separated list of the scopes for the Azure API authentication. |


For instructions about how to configure an integration in
Google SecOps, see [Configure
integrations](https://docs.cloud.google.com/chronicle/docs/soar/respond/integrations-setup/configure-integrations).

You can make changes at a later stage, if needed. After you configure an
integration instance, you can use it in playbooks. For more information about
how to configure and support multiple instances, see [Supporting
multiple instances](https://docs.cloud.google.com/chronicle/docs/soar/respond/integrations-setup/supporting-multiple-instances).

<br />

## Actions


For more information about actions, see [Respond to pending actions from your workdesk](https://docs.cloud.google.com/chronicle/docs/soar/overview-and-introduction/your-workdesk/respond-to-pending-actions-from-workdesk) and [Run a
manual action in your case](https://docs.cloud.google.com/chronicle/docs/soar/investigate/working-with-cases/what-actions-can-you-take-on-a-case#run-manual-action).

### Execute HTTP Request

Use the **Execute HTTP Request** action to construct and execute a customized
HTTP API request against a target URL.


This action doesn't run on Google SecOps entities.

#### Action behavior

This action supports complex behaviors including asynchronous polling, dynamic
payload construction, and file management.

##### Asynchronous polling

When [`Expected Response Values`](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#expected-response-values) is provided, the
action operates in asynchronous mode. In this mode, the action repeatedly polls
the target endpoint to track the state of a response (for example, waiting for a
long-running task to complete).

The action evaluates the response body against the JSON conditions provided in
the parameter and continues execution until the conditions are met or the action
reaches its timeout.

###### Condition logic

The action supports the following logic for tracking response states:

- **Single field matching**: The action waits for a specific field to reach a
  single value.

      {
        "state": "finished"
      }

- **Multiple values (OR logic)**: The action stops execution if a field matches
  any value in a provided list. This is useful for stopping on both "success" and
  "error" states to avoid unnecessary polling.

      {
        "state": ["finished", "error"]
      }

- **Multiple fields (AND logic)**: The action waits until all specified fields
  match their respective values simultaneously.

      {
        "state": "finished",
        "percentage": "100"
      }

- **Combined logic**: You can combine multiple conditions within the JSON
  object.

      {
        "state": ["finished", "error"],
        "percentage": "10"
      }

###### JSON parsing behavior

When evaluating conditions, the action follows these rules:

- **Global search** : The action searches the entire JSON response object for the
  specified keys. Provide the key name exactly as it appears in the
  JSON without prepending parent object names or using prefixes (for example, use
  `"state"`, not `"data_state"` or `"data-state"`).

- **Multiple identical keys**: If the response contains multiple keys with the
  same name at different levels of the JSON hierarchy, the expected output is only
  reached when all matching key names satisfy the identical expected value.

  For example, to search for the `finished` state in the JSON response and
  ignore other states, set all `state` keys in `Expected Response Values` to
  `finished`:

      {
      "data": {
        "state": "finished"
        },
        "state": "finished"
      }

##### Body payload construction

The action constructs the request body based on the `Content-Type` header
provided in [`Headers`](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#headers).

This is the [`Body Payload`](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#body-payload) input used for
the following construction examples:

    {
      "Id": "123123",
      "sorting": "asc"
    }

- **`application/x-www-form-urlencoded`** : The action generates the payload as
  `Id=123123&sorting=asc`.

- **`application/json`**: The action generates the following JSON payload:

      {
        "Id": "123123",
        "sorting": "asc"
      }

- **`XML`** : If the third-party product requires XML, provide an XML-formatted
  input directly in `Body Payload`:

      <?xml version="1.0" encoding="utf-8"?>
      <soap:Envelope xmlns:soap="[http://schemas.xmlsoap.org/soap/envelope/](http://schemas.xmlsoap.org/soap/envelope/)">
      <soap:Body>
        <NumberToWords xmlns="[http://www.dataaccess.com/webservicesserver/](http://www.dataaccess.com/webservicesserver/)">
          <ubiNum>500</ubiNum>
        </NumberToWords>
      </soap:Body>
      </soap:Envelope>

##### File handling

The action supports the following workflows for managing files:

- **Downloading files**:

  - To return file data as part of the JSON result in base64 format, select
    [`Base64 Output`](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#base64-output).

  - To save a file directly to the Case Wall as a ZIP archive, select
    [`Save To Case Wall`](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#save-to-case-wall).

- **Uploading files** : To upload a file, convert it to a base64-encoded string
  and include it as part of the `Body Payload` value.

  The following example shows an image file converted to a base64-encoded
  string:

      iVBORw0KGgoAAAANSUhEUgAAAOEAAADgCAMAAADCMfHtAAAAvVBMVEX////2yBctLS32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3FzDHLkfH5wazfK0YLbmqzBsz9m3FxGUb7wshmZXyarX2IxehROVQQ0XN6B6E+xWi2Fkyai8AIGHcvDkq7iFC97LucuJTrEItPVwenXGLQnj2uWSrR3ERVfPJ3dAAF1lS0L/8uNzSZKBjcRozcmXfHX5DdG+rj2d/BxOWc7YNz7iz73db5Vya3h3q7M2q1Wt1ud7b+33hcz9yhzpEjR44cOXLkyJEjh0H8ByMJ8u+aLBzeAAAAAElFTkSuQmCC

- **Security** : For sensitive files (such as malware), select
  [`Password Protect Zip`](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#password-protect-zip). This automatically encrypts the
  saved ZIP archive created using `Save To Case Wall` with the password
  `infected`.

#### Playbook block configuration

The following configuration demonstrates how to use the **Execute HTTP Request**
action within a playbook block. Use this example to understand how to apply
placeholders and input prefixes.

When using block inputs as placeholders, you must include the `Input.` prefix
(for example, `[Input.comment]`).

- **Method** : `PUT`

- **URL Path**:

      https://{API_URL}/[Input.table_name]/[Input.sys_id]

- **Headers**:

      {
        "Content-type": "application/json; charset=utf-8",
        "Accept": "application/json",
        "User-Agent": "GoogleSecops"
      }

- **Body Payload**:

      {
        "work_notes": "[Input.comment]"
      }

#### Action inputs

The **Execute HTTP Request** action requires the following parameters:

| Parameter | Description |
|---|---|
| `Method` | Optional. The HTTP method (verb) used for the request. The possible values are as follows: - `GET` - `POST` - `PUT` - `PATCH` - `DELETE` - `HEAD` - `OPTIONS` The default value is `GET`. |
| `URL Path` | Required. The API endpoint where the request executes. This path can optionally include query parameters. |
| `URL Params` | Optional. The query parameters for the URL, provided as a JSON object. This is the recommended input method for this parameter, as they are appended to any query parameters already defined in `URL Path`. |
| `Headers` | Optional. The headers for the HTTP request, provided as a JSON object. Headers control aspects such as authentication and define the format of `Body Payload` (using `Content-Type`). |
| `Cookie` | Optional. The cookies constructed into the HTTP `Cookie` header, provided as a JSON object. This parameter overrides any cookie values provided in `Headers`. |
| `Body Payload` | Optional. The content payload for the HTTP request, provided as a JSON object. The request's format (JSON or form-urlencoded) is determined by the `Content-Type` set in `Headers`. |
| `Expected Response Values` | Optional. The JSON object containing the field-value pairs that define the required state of the response body. > [!NOTE] > **Note:** Providing a value for this parameter triggers asynchronous polling behavior. For detailed information on formatting conditions and logical operators, see [Action behavior](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#action-behavior). |
| `Save To Case Wall` | Optional. If selected, the action saves the response data as a file and attaches it to the case wall. The file is archived with a `.zip` extension. This zip is not password protected unless `Password Protect Zip` is enabled. |
| `Password Protect Zip` | Optional. If selected, the action encrypts the downloaded ZIP archive (created using `Save To Case Wall`) with a password (such as `infected`). Use this option when dealing with suspicious or potentially malicious files to prevent accidental execution. Enabled by default. |
| `Follow Redirects` | Optional. If selected, the action automatically follows any HTTP redirect responses (such as 301 or 302 status codes) to the final destination URL. Enabled by default. |
| `Fail on 4xx/5xx` | Optional. If selected, the action explicitly fails the step when the HTTP response returns a client Error (4xx) or server Error (5xx) status code. Enabled by default. |
| `Base64 Output` | Optional. If selected, the action converts the HTTP response body into a Base64 encoded string. This is useful for processing or storing downloaded files. The encoded string can't exceed 15 MB. |
| `Fields To Return` | Required. A comma-separated list of fields that the action returns in the output. The possible values are as follows: - `response_data` - `redirects` - `response_code` - `response_cookies` - `response_headers` - `apparent_encoding` The default value is `response_data,redirects,response_code,response_cookies,response_headers,apparent_encoding`. |
| `Request Timeout` | Required. The maximum time, in seconds, the action waits for the server to send data before the request is aborted. The default value is `120`. |

#### Action outputs

The **Execute HTTP Request** action provides the following outputs:

| Action output type | Availability |
|---|---|
| Case wall attachment | Not available |
| Case wall link | Not available |
| Case wall table | Not available |
| Enrichment table | Not available |
| JSON result | Available |
| Output messages | Available |
| Script result. | Available |

##### JSON result

The following example shows the JSON result output received when using the
**Execute HTTP Request** action:

    {
       "response_data": {
           "data": {
               "relationships": {
                   "comment": [
                       {
                           "name": "example_resource_name",
                           "description": "Description of the object to which the comment belongs."
                       },
                       {
                           "name": "example_user_role",
                           "description": "Description of the user role associated with the comment."
                       }
                   ]
               }
           }
       },
       "redirects": [],
       "response_code": 200,
       "cookies": {},
       "response_headers": {
           "Content-Type": "application/json",
           "X-Cloud-Trace-Context": "REDACTED_TRACE_ID",
           "Date": "REDACTED_DATE_TIME",
           "Server": "REDACTED_SERVER_NAME",
           "Content-Length": "REDACTED_VALUE"
       },
       "apparent_encoding": "ascii"
    }

##### Output messages

The **Execute HTTP Request** action can return the following output messages:

| Output message | Message description |
|---|---|
| `Successfully executed API request.` `Successfully executed API request, but the status code 4xx_OR_5xx was returned. Please check the request or try again later.` | The action succeeded. |
| `Failed to execute API request. Error: ERROR_REASON` | The action failed. Check the connection to the server, input parameters, or credentials. |

##### Script result

The following table lists the value for the script result output when using
the **Execute HTTP Request** action:

| Script result name | Value |
|---|---|
| `is_success` | `true` or `false` |

### Get Authorization

Use the **Get Authorization** action to initiate the OAuth flow and obtain a
link that contains the required access code for delegated authentication.


This action doesn't run on Google SecOps entities.

#### Action inputs

The **Get Authorization** action requires the following parameters:

| Parameter | Description |
|---|---|
| `Oauth Scopes` | Required. A comma-separated list of permissions (scopes) that define the level of access for the access and refresh tokens. The default value is `user.read, offline_access`. |

#### Action outputs

The **Get Authorization** action provides the following outputs:

| Action output type | Availability |
|---|---|
| Case wall attachment | Not available |
| Case wall link | Not available |
| Case wall table | Not available |
| Enrichment table | Not available |
| JSON result | Not available |
| Output messages | Available |
| Script result. | Available |

##### Output messages

The **Get Authorization** action can return the following output messages:

| Output message | Message description |
|---|---|
| `Authorization URL generated successfully. To obtain a URL with access code,Please navigate to the link below as the user that you want to run the integration with., to get a URL with access code. Provide the URL with the access code should be provided next in the Generate Token action.` | The action succeeded. |
| `Failed to generate the authorization URL! Error is ERROR_REASON` | The action failed. Check the connection to the server, input parameters, or credentials. |

##### Script result

The following table lists the value for the script result output when using
the **Get Authorization** action:

| Script result name | Value |
|---|---|
| `is_success` | `true` or `false` |

### Generate Token

Use the **Generate Token** action to obtain a persistent refresh token required
for delegated authentication.

This token is generated using the authorization URL received from the
[Get Authorization](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#get-authorization) action.


This action doesn't run on Google SecOps entities.

> [!NOTE]
> **Note:** We strongly recommend configuring and activating the [Refresh Token Renewal Job](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#refresh-token-renewal) immediately after generating the initial refresh token. This job automatically renews the token periodically, ensuring it remains valid and preventing integration failures due to expiration.

#### Action inputs

The **Generate Token** action requires the following parameters:

| Parameter | Description |
|---|---|
| `Authorization URL` | Required. The full redirected URL containing the authorization code received from the [Get Authorization](https://docs.cloud.google.com/chronicle/docs/soar/marketplace-integrations/azure-api#get-authorization) action. This URL is used to request and generate the refresh token. |

#### Action outputs

The **Generate Token** action provides the following outputs:

| Action output type | Availability |
|---|---|
| Case wall attachment | Not available |
| Case wall link | Not available |
| Case wall table | Not available |
| Enrichment table | Not available |
| JSON result | Not available |
| Output messages | Available |
| Script result. | Available |

##### Output messages

The **Generate Token** action can return the following output messages:

| Output message | Message description |
|---|---|
| `Successfully fetched the refresh token: TOKEN_VALUE. Enter this token in the integration configuration to enable the integration to authenticate with delegated permissions on behalf of the user that performed the configuration steps. Note: We strongly recommend you configure the "Refresh Token Renewal Job" after you generate the initial refresh token so the job automatically renews and keeps the token valid.` | The action succeeded. |
| `Failed to get the refresh token! Error is ERROR_REASON` | The action failed. Check the connection to the server, input parameters, or credentials. |

##### Script result

The following table lists the value for the script result output when using
the **Generate Token** action:

| Script result name | Value |
|---|---|
| `is_success` | `true` or `false` |

### Ping

Use the **Ping** action to test the connectivity to Azure API.


This action doesn't run on Google SecOps entities.

#### Action inputs

None.

#### Action outputs

The **Ping** action provides the following outputs:

| Action output type | Availability |
|---|---|
| Case wall attachment | Not available |
| Case wall link | Not available |
| Case wall table | Not available |
| Enrichment table | Not available |
| JSON result | Available |
| Output messages | Available |
| Script result. | Available |

##### JSON result

The following example shows the JSON result output received when using the
**Ping** action:

    {
        "endpoint": "https://api.example-cloud-provider.com/v1.0/health"
    }

##### Output messages

The **Ping** action can return the following output messages:

| Output message | Message description |
|---|---|
| `Successfully tested connectivity.` | The action succeeded. |
| `Failed to test connectivity. ERROR_REASON` | The action failed. Check the connection to the server, input parameters, or credentials. |

##### Script result

The following table lists the value for the script result output when using
the **Ping** action:

| Script result name | Value |
|---|---|
| `is_success` | `true` or `false` |

## Jobs


For more information on jobs, see
[Configure a new job](https://docs.cloud.google.com/chronicle/docs/soar/respond/jobs-scheduler/writing-jobs#configure-a-new-job) and
[Advanced scheduling](https://cloud.google.com/chronicle/docs/soar/respond/jobs-scheduler/writing-jobs#advanced-scheduling).

### Refresh Token Renewal Job

Use the **Refresh Token Renewal Job** to periodically update the refresh token
configured for the integration.

By default, the refresh token expires every 90 days. We recommended you to
configure this job to automatically run every 7 or 14 days to keep the refresh
token up to date.

> [!IMPORTANT]
> **Important:** This job can cause conflicts if it doesn't have a unique name across all integrations.
>
> To prevent this, follow these steps:
>
> 1. [Create a copy](https://docs.cloud.google.com/chronicle/docs/soar/respond/ide/using-the-ide#using-the-ide-duplicate-item) of the job in the IDE.
> 2. Rename the copied job to a unique name. The recommended naming convention is "Azure API - Refresh Token Renewal Job".
>
#### Job parameters

The **Refresh Token Renewal Job** requires the following parameters:

| Parameter | Description |
|---|---|
| `Integration Environments` | Optional. A comma-separated list of integration environment names for which the job updates refresh tokens. Each environment name must be enclosed in double quotes. |

**Need more help?** [Get answers from Community members and Google SecOps professionals.](https://security.googlecloudcommunity.com/)