Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
This feature is part of Frontier preview program. Frontier connects you directly with Microsoft’s latest AI innovations. Frontier previews are subject to the existing preview terms of your customer agreements. As these features are still in development, their availability and capabilities may change over time.
A Google Cloud organization can contain multiple projects. To use one set of credentials to synchronize Vertex AI agents across those projects, create a service account in a management project. Grant the service account access to the organization and to each project that contains agents to synchronize.
You can configure cross-project access manually in the Google Cloud console or by running a script in Google Cloud Shell.
Prerequisites
Before you begin, ensure that you have:
- A management project in which to create the Google Cloud service account.
- The project IDs for each project that contains Vertex AI agents to synchronize.
- Your numeric Google Cloud organization ID.
- Permissions to create service accounts and service account keys in the management project.
- Permissions to create custom roles and manage IAM policies in each target project.
- Permissions to manage IAM policies for the organization.
- The permissions that the service account needs: the Vertex AI permissions in each target project, and these permissions on the organization, which the Browser role provides:
resourcemanager.organizations.get,resourcemanager.folders.get,resourcemanager.folders.list,resourcemanager.projects.get, andresourcemanager.projects.list.
Configure cross-project access manually
Create the service account
- Sign in to the Google Cloud console.
- Select the management project in which you want to create the service account.
- Go to IAM & Admin > Service Accounts, and create a service account.
- Copy the service account email address. Use this address when you grant access to the organization and target projects.
Grant access to the target projects
For least-privilege access, create a custom role in each target project. Alternatively, grant the predefined Agent Platform Administrator role, or grant the predefined Vertex AI Viewer role (roles/aiplatform.viewer) together with aiplatform.reasoningEngines.delete.
Complete these steps in each project that contains Vertex AI agents to synchronize:
Select the target project.
Go to IAM & Admin > Roles, and then select Create role.
Select Add permissions, and add the following permissions:
aiplatform.reasoningEngines.listaiplatform.reasoningEngines.getaiplatform.reasoningEngines.delete
Select Create.
Go to IAM & Admin > IAM, and then select Grant access.
In New principals, enter the service account email address.
Assign the custom role, and then select Save.
If you use the predefined role, skip the custom-role creation steps and assign Agent Platform Administrator when you grant access.
Grant access to the organization
- Select your Google Cloud organization.
- Go to IAM & Admin > IAM, and then select Grant access.
- Add the service account as a principal, assign the Browser role, and then select Save.
The Browser role allows the service account to list the projects in the organization. It provides these permissions:
resourcemanager.organizations.get
resourcemanager.folders.get
resourcemanager.folders.list
resourcemanager.projects.get
resourcemanager.projects.list
Access to Vertex AI resources is controlled by the role assigned in each target project.
Create a service account key
- Return to the project where you created the service account, and go to IAM & Admin > Service Accounts.
- Select the service account, and then select Keys > Add key > Create new key.
- Select JSON, and then select Create. Store the downloaded key securely.
Important
The JSON key contains sensitive credentials. Store it securely, don't commit it to source control, and revoke it when it's no longer required.
Use the full contents of the JSON key file as the Google Vertex AI credentials when you create a connection in the Microsoft 365 admin center.
Configure cross-project access by using Google Cloud Shell
The following script creates the service account, creates or updates a custom role in each target project, grants the custom role to the service account, and grants the organization-level Browser role.
Important
The script updates an existing custom role that has the ID specified by CUSTOM_ROLE_ID. Use a dedicated role ID to avoid replacing permissions in an unrelated role.
- Open Google Cloud Shell.
- In the Configuration section of the script, replace the example values with your values.
- Run the script.
# ---------- Configuration ----------
SERVICE_ACCOUNT_PROJECT="service-account-project-id"
SERVICE_ACCOUNT_ID="mac-agent-sync"
SERVICE_ACCOUNT_DISPLAY_NAME="Microsoft 365 Agent Sync"
# Use project IDs, not project names or project numbers.
TARGET_PROJECTS=(
"vertex-agent-project-1"
"vertex-agent-project-2"
)
# Numeric organization ID, for example: 123456789.
ORGANIZATION_ID="123456789"
# Custom role IDs can't contain spaces. The displayed title can contain spaces.
CUSTOM_ROLE_ID="MACAgentSyncRole"
CUSTOM_ROLE_TITLE="MAC AgentSync Role"
CUSTOM_ROLE_PERMISSIONS="aiplatform.reasoningEngines.list,aiplatform.reasoningEngines.get,aiplatform.reasoningEngines.delete"
SERVICE_ACCOUNT_EMAIL="${SERVICE_ACCOUNT_ID}@${SERVICE_ACCOUNT_PROJECT}.iam.gserviceaccount.com"
MEMBER="serviceAccount:${SERVICE_ACCOUNT_EMAIL}"
echo "Creating service account ${SERVICE_ACCOUNT_EMAIL}..."
if gcloud iam service-accounts describe "${SERVICE_ACCOUNT_EMAIL}" \
--project="${SERVICE_ACCOUNT_PROJECT}" >/dev/null 2>&1; then
echo "Service account already exists."
else
gcloud iam service-accounts create "${SERVICE_ACCOUNT_ID}" \
--project="${SERVICE_ACCOUNT_PROJECT}" \
--display-name="${SERVICE_ACCOUNT_DISPLAY_NAME}" \
--description="Synchronizes Google Vertex AI agents with Microsoft 365"
fi
for PROJECT in "${TARGET_PROJECTS[@]}"; do
echo "Configuring project ${PROJECT}..."
# Fail early when a project ID is invalid or inaccessible.
gcloud projects describe "${PROJECT}" >/dev/null
ROLE_NAME="projects/${PROJECT}/roles/${CUSTOM_ROLE_ID}"
if gcloud iam roles describe "${CUSTOM_ROLE_ID}" \
--project="${PROJECT}" >/dev/null 2>&1; then
gcloud iam roles update "${CUSTOM_ROLE_ID}" \
--project="${PROJECT}" \
--title="${CUSTOM_ROLE_TITLE}" \
--description="Access required for Microsoft Agent 365 Vertex AI agent synchronization" \
--permissions="${CUSTOM_ROLE_PERMISSIONS}" \
--stage="GA"
else
gcloud iam roles create "${CUSTOM_ROLE_ID}" \
--project="${PROJECT}" \
--title="${CUSTOM_ROLE_TITLE}" \
--description="Access required for Microsoft Agent 365 Vertex AI agent synchronization" \
--permissions="${CUSTOM_ROLE_PERMISSIONS}" \
--stage="GA"
fi
gcloud projects add-iam-policy-binding "${PROJECT}" \
--member="${MEMBER}" \
--role="${ROLE_NAME}" \
--condition=None \
--quiet
done
echo "Granting organization-level Browser access..."
gcloud organizations describe "${ORGANIZATION_ID}" >/dev/null
gcloud organizations add-iam-policy-binding "${ORGANIZATION_ID}" \
--member="${MEMBER}" \
--role="roles/browser" \
--condition=None \
--quiet
echo
echo "Cross-project configuration completed."
echo "Service account: ${SERVICE_ACCOUNT_EMAIL}"
After the script finishes, create a JSON key for the service account:
- In the Google Cloud console, open the project specified by
SERVICE_ACCOUNT_PROJECT. - Go to IAM & Admin > Service Accounts.
- Select the service account, and then select Keys > Add key > Create new key.
- Select JSON, and then select Create. Store the downloaded key securely.
Important
The JSON key contains sensitive credentials. Store it securely, don't commit it to source control, and revoke it when it's no longer required.
Use the full contents of the JSON key file as the Google Vertex AI credentials when you create a connection in the Microsoft 365 admin center.