> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Ad Group

> Fallback Microsoft Ads ad group update tool for advanced or unsupported ad group fields

Fallback Microsoft Ads ad group update tool for advanced or unsupported ad group fields. Use dedicated operations first for common changes such as status or bid. This calls REST UpdateAdGroups with PUT /AdGroups, but sends a partial AdGroup object: the runner supplies CampaignId and AdGroups\[0].Id, then merges only the fields in update\_payload. Use care with nested objects like Settings because Microsoft may replace the submitted nested object or setting. Supports dry-run review.

|                       |                                 |
| --------------------- | ------------------------------- |
| **App**               | Microsoft Ads                   |
| **Operation ID**      | `microsoft_ads_update_ad_group` |
| **Type**              | Action                          |
| **Connection**        | `microsoft_ads` (required)      |
| **Credits per run**   | 1                               |
| **Agent / MCP tool**  | Yes                             |
| **Requires approval** | Yes (write operation)           |

## Inputs

| Field            | Type                                                                      | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ---------------- | ------------------------------------------------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `account`        | object or array of object or MicrosoftAdsAccountItem or string or integer | Yes      | -       | Select the Microsoft Ads account that contains the ad group.                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `campaign_id`    | string or SelectItem                                                      | Yes      | -       | The campaign ID that contains the ad group. Do not include this inside update\_payload.                                                                                                                                                                                                                                                                                                                                                                                              |
| `ad_group_id`    | string or SelectItem                                                      | Yes      | -       | The Microsoft Ads ad group ID to update. Do not include this inside update\_payload.                                                                                                                                                                                                                                                                                                                                                                                                 |
| `update_payload` | object or string                                                          | Yes      | -       | Partial Microsoft Ads AdGroup object as JSON. This uses the REST UpdateAdGroups endpoint: the runner sends CampaignId and AdGroups\[0].Id separately, then merges only the fields provided here. Do not include identity fields such as CampaignId, Id, ad\_group\_id, campaign\_id, account, or connection\_id. Example payloads: \{"Language": "English"} or \{"Settings": \[\{"Type": "TargetSetting", "Details": \[\{"CriterionTypeGroup": "Audience", "TargetAndBid": true}]}]} |
| `dry_run`        | boolean                                                                   | No       | `False` | When true, return the resolved Microsoft Ads UpdateAdGroups payload without calling Microsoft Ads.                                                                                                                                                                                                                                                                                                                                                                                   |

### MicrosoftAdsAccountItem

| Field        | Type   | Required | Default | Description                                                                                                     |
| ------------ | ------ | -------- | ------- | --------------------------------------------------------------------------------------------------------------- |
| `value`      | string | Yes      | -       |                                                                                                                 |
| `label`      | string | Yes      | -       |                                                                                                                 |
| `customerId` | string | No       | -       | The Microsoft Ads customer ID used for REST CustomerId headers. If omitted, it is resolved from the account ID. |

### SelectItem

| Field   | Type   | Required | Default | Description                                                                                          |
| ------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
| `value` | string | Yes      | -       | The value of the selectable item.                                                                    |
| `label` | string | Yes      | -       | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

## Output

**Type**: `Dict`

Returns campaign\_id, ad\_group\_id, updated\_fields, final Microsoft Ads UpdateAdGroups payload, dry\_run status, and any returned Microsoft response data.

**Fields**: `campaign_id`, `ad_group_id`, `updated_fields`, `payload`, `dry_run`, `response`
