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

# How to use the Merge identity with addressless entities Tool

> Automatically merge unknown SaaS accounts via API. A tool that simplifies linking between directories.

## **What you can do with the Merge identity with addressless entities Tool**

Use this tool and the API to merge (match/link) SaaS accounts with no email address into another directory.

The tool also uses the API to automatically retrieve the PeopleID required for merging.

Some accounts appear as unknown, such as GitHub accounts where no email address is available. This tool links that data to the correct directory more easily than doing so manually.

Reference: [Manually link (match/merge) a SaaS account to another account](/en/it-management/saas-management/d97dy5z2l7-merge)

## **Target environment**

* Google Sheets

## **Prerequisites**

Prepare a list of the merge source directory (the directory without email addresses). Also list the merge target directory (the directory with email addresses). Pair the display name (equivalent to the SaaS ID) of the source with the email address of the target.

## Setup steps

## **Preparation**

1. Go to Settings > API Keys, and obtain your **Organization ID** and **API Key**.

<img src="https://mintcdn.com/moneyforwardi/UPiQnxo55BGwl4Kh/images/it-management/6ax6mziqu2/1733404488057-image.png?fit=max&auto=format&n=UPiQnxo55BGwl4Kh&q=85&s=70c699f595e254fd50a40f3431dd81d6" alt="Copying the organization ID from the settings menu" width="1970" height="472" data-path="images/it-management/6ax6mziqu2/1733404488057-image.png" />

<img src="https://mintcdn.com/moneyforwardi/RTQYdqStEERHxfS9/images/it-management/6ax6mziqu2/apikey.png?fit=max&auto=format&n=RTQYdqStEERHxfS9&q=85&s=65f207d67dfd2060d8594ba4d50d88a2" alt="Screen for generating an API key on the Admina API keys screen" width="1740" height="786" data-path="images/it-management/6ax6mziqu2/apikey.png" />

2\. Download the spreadsheet from the link below.
\[Spreadsheet]
[Merge identity with addressless entities](https://docs.google.com/spreadsheets/d/1EIwysIQJZadxhXMzSHBY-oxG5Tx7rskHiW-pKPI87B8/copy)
A screen like the one in the screenshot will appear. Save a copy to your own environment to start using it.

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6ax6mziqu2/2025-02-26-23-59-46.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=1d9e1d9408197349bcdf38f59f8bc270" alt="Google Sheets copy confirmation screen" width="1260" height="648" data-path="images/it-management/6ax6mziqu2/2025-02-26-23-59-46.png" />

3. Open Extensions > Apps Script, then go to Project Settings > Script Properties.
   Add `APItoken` and `organizationId` as property names, and enter the **API Key** and **Organization ID** you obtained in step 1.

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6ax6mziqu2/2025-02-27-0-08-18.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=39aac31fb568a4241079662e70d9a35f" alt="Opening Apps Script from the Extensions menu in Google Sheets" width="1536" height="316" data-path="images/it-management/6ax6mziqu2/2025-02-27-0-08-18.png" />

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6ax6mziqu2/2025-02-27-0-08-52.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=bc44a5734739de7ad0fa58c79a96a531" alt="Opening Script Properties in Apps Script project settings" width="570" height="624" data-path="images/it-management/6ax6mziqu2/2025-02-27-0-08-52.png" />

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6ax6mziqu2/2025-08-06-19-41-33.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=41c72c5cb8be2b0739d7a31003772a0d" alt="Entering the API token and organization ID in Script Properties" width="722" height="289" data-path="images/it-management/6ax6mziqu2/2025-08-06-19-41-33.png" />

<h2 id="usage">
  **How to use the Merge identity with addressless entities Tool**
</h2>

1. In the "Merge" sheet, configure the `serviceId` and `workspaceIds` fields under Setting.
   `serviceId`: Go to Services > the target SaaS (e.g. GitHub) > Service ID to find the value.

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6ax6mziqu2/2025-08-06-19-49-31.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=184544882de1776279d86e6b9d3c771b" alt="Checking the service ID from the service settings" width="292" height="94" data-path="images/it-management/6ax6mziqu2/2025-08-06-19-49-31.png" />

`workspaceIds`: Go to Services > the target SaaS (e.g. GitHub) > the relevant workspace > Workspace ID to find the value.

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6ax6mziqu2/2025-08-06-19-53-45.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=bb70500f8cbffd046f1d8f74f8e2cbd9" alt="Selecting a workspace from the service settings" width="615" height="517" data-path="images/it-management/6ax6mziqu2/2025-08-06-19-53-45.png" />

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6ax6mziqu2/2025-08-06-19-55-49.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=85941cd5d31f6b568442d090269560c6" alt="Checking the workspace ID in the service settings" width="806" height="527" data-path="images/it-management/6ax6mziqu2/2025-08-06-19-55-49.png" />

Enter the `serviceId` and `workspaceIds` you found into the Setting section of the "Merge" sheet.

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6ax6mziqu2/2025-08-06-19-58-38.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=463edf7f07b6aa799bd85b7d00c3fed6" alt="Entering the service ID and workspace ID in the Setting section of the spreadsheet" width="217" height="80" data-path="images/it-management/6ax6mziqu2/2025-08-06-19-58-38.png" />

2. Prepare the list described in the Prerequisites section and enter the `SaaSID` and `MailAddress` values.

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6ax6mziqu2/2025-08-06-20-29-09.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=30705f4201a501268525e143dacb9e17" alt="Entering SaaS IDs and email addresses in the Merge sheet" width="1250" height="58" data-path="images/it-management/6ax6mziqu2/2025-08-06-20-29-09.png" />

`SaaSID`: The display name or username from the merge source directory that contains the SaaS ID or similar identifier.

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6ax6mziqu2/2025-08-06-20-04-45.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=22d55007096e4980842f9709e86531b4" alt="Display name or username listed in the merge source directory" width="1483" height="652" data-path="images/it-management/6ax6mziqu2/2025-08-06-20-04-45.png" />

When a match is found for the display name or username, values are returned in `identityId` and `fromPeopleId`.

`MailAddress`: The email address that serves as the key linking the merge source and merge target.

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6ax6mziqu2/2025-08-06-20-22-08.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=e1ac1a8c4352ef95c222305764aa22e5" alt="Entering the email address of the merge target directory" width="701" height="549" data-path="images/it-management/6ax6mziqu2/2025-08-06-20-22-08.png" />

When a match is found for the directory email address, a value is returned in `toPeopleId`.

3. Click the **Get PeopleID** button in the spreadsheet.

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6ax6mziqu2/2025-08-06-20-27-59.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=109f68c4272192efb0a12e4ce87665a8" alt="Get PeopleID button in the spreadsheet" width="1502" height="284" data-path="images/it-management/6ax6mziqu2/2025-08-06-20-27-59.png" />

When retrieval succeeds, values are populated in `identityId`, `fromPeopleId`, and `toPeopleId`.

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6ax6mziqu2/2025-08-06-20-30-40.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=905bf0d7ab781225fbffa0d55de00ac0" alt="Spreadsheet with values populated after retrieving PeopleIDs" width="1497" height="283" data-path="images/it-management/6ax6mziqu2/2025-08-06-20-30-40.png" />

4\. Click the **Run Merge** button in the spreadsheet.

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6ax6mziqu2/2025-08-06-20-33-53.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=0598da8b5a4f5c02748f47c5d4c1975e" alt="Run Merge button in the spreadsheet" width="1499" height="285" data-path="images/it-management/6ax6mziqu2/2025-08-06-20-33-53.png" />

When the merge succeeds, the result is recorded in `postMerge` and you can confirm the merge in this service.

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6ax6mziqu2/2025-08-06-20-36-28.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=d29a791052800a38b93ccd57a1435fbd" alt="Spreadsheet showing the merge result after running the merge process" width="1252" height="55" data-path="images/it-management/6ax6mziqu2/2025-08-06-20-36-28.png" />

<img src="https://mintcdn.com/moneyforwardi/t1aTQ6IKtC55gNyd/images/it-management/6ax6mziqu2/2025-08-06-20-37-26.png?fit=max&auto=format&n=t1aTQ6IKtC55gNyd&q=85&s=2806dc938ceb6a1c83597cda114011b6" alt="Confirming the merge result" width="1487" height="531" data-path="images/it-management/6ax6mziqu2/2025-08-06-20-37-26.png" />

That completes the guide for using the Merge identity with addressless entities Tool.

If you have any questions or concerns, please contact us through chat support.
