# How to Provision Complex and Multi-valued Attributes on Google Workspace

**URL:** <https://developer.sailpoint.com/discuss/t/how-to-provision-complex-and-multi-valued-attributes-on-google-workspace/114220>\
**Category:** SHF Discussion and Questions\
**Tags:** identity-security-cloud, transforms, connectors, provisioning\
**Created:** [April 22, 2025, 12:24pm UTC](https://developer.sailpoint.com/discuss/t/how-to-provision-complex-and-multi-valued-attributes-on-google-workspace/114220 "2025-04-22T12:24:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Markharoll](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/markharoll/32/20455_2.png) [@Markharoll](https://developer.sailpoint.com/discuss/u/Markharoll)\
**Post date:** [April 22, 2025, 12:24pm UTC](https://developer.sailpoint.com/discuss/t/how-to-provision-complex-and-multi-valued-attributes-on-google-workspace/114220/1 "2025-04-22T12:24:09Z")

</div>

Hi Community,

I’m working with the Google Workspace connector in Identity Security Cloud and have a couple of questions regarding how to correctly format attributes during provisioning, specifically for the “Create Account” operation.

**Complex Attributes (e.g., Emails):**  
Google Workspace expects email attributes in a complex format, like `{"address":"test1@google.com","type":"other"}`. In my provisioning policy, I can easily generate the required email address (e.g., `test1@google.com`) from identity attributes.  
My questions are:

1. Do I need to create a Transform (e.g. a Concat type) to manually build the _entire_ JSON string `{"address":"...","type":"..."}` and insert my email in the `address` attribute of the JSON?
2. Or, is the connector smart enough that I can simply map the email address string directly to the `emails.address` (or similar) attribute, and the connector handles constructing the necessary JSON object for the Create Account?

**Multi-valued Attributes:**  
Similarly, for multi-valued attributes (e.g., phone numbers, custom schema fields) that need to be sent during account creation:

1. How should these be handled? Do I need to use a Transform to format the list of values into a specific JSON array string (e.g., `["value1", "value2", "value3"]`) before mapping it to the target attribute?
2. Or, can I directly map a multi-valued attribute from SailPoint (like Entitlement values or a multi-valued Identity Attribute), and the connector will correctly format it as an array for the Google Workspace API?

Any insights, examples, or best practices would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![sukanta\_biswas](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sukanta_biswas/32/24596_2.png) [@sukanta\_biswas](https://developer.sailpoint.com/discuss/u/sukanta_biswas)\
**Post date:** [April 22, 2025, 3:14pm UTC](https://developer.sailpoint.com/discuss/t/how-to-provision-complex-and-multi-valued-attributes-on-google-workspace/114220/2 "2025-04-22T15:14:34Z")

</div>

@Markharoll -

Great questions — and this comes up frequently when working with the **Google Workspace connector in SailPoint IdentityNow (Identity Security Cloud)** due to the way Google APIs expect structured (often nested/complex) JSON formats. Let’s break down your questions clearly:

* * *

### **1. Complex Attributes (e.g., `emails`)**

**Question:**

> Do I need to create a Transform to build `{"address":"...","type":"..."}` or can I just send `test1@google.com` and let the connector handle the JSON structure?

**Answer:**  
Yes — **you need to construct the entire JSON object structure yourself** , usually via a **Transform** (e.g., `Script`, `Concat`, or `Custom`). The connector **does not** automatically wrap a plain string into the necessary JSON object for Google APIs.

#### Best Practice:

If you want to keep it static and simple, use a **static Transform** (if `type` is always `work`):

```json
{
    "name": "Email-Community",
    "type": "static",
    "attributes": {
        "value": "{\"address\":\"$email\"\"type\":\"work\"}",
        "email": {
            "type": "identityAttribute",
            "attributes": {
                "name": "email"
            }
        }
    }
}

```

Then map this to the **`emails`** attribute in the provisioning policy.

* * *

### **2. Multi-valued Attributes (e.g., `phones`, `keywords`, etc.)**

**Question:**

> Do I need to transform a list into a JSON array like `["value1", "value2"]` or does SailPoint do it?

**Answer:**  
Yes — again, you must **format the array structure yourself**. ISC **does not auto-convert** a list of values into the Google Workspace required array-of-objects format.

This is especially true for:

- `phones`
- `keywords`
- `customSchemas`
- `organizations`

#### Best Practice:

If it’s a multi-valued list of complex objects, you can use **static Transform** or relevant transform to build the array properly. Then map the output of this transform directly to `keywords`, `phones`, etc. in the provisioning policy.

* * *

### Summary (Cheat Sheet)

| Attribute Type | Requires JSON Structure? | Auto-Handled by ISC? | Recommended Approach |
| --- | --- | --- | --- |
| `emails` (complex) | Yes | No | Use Transform |
| `phones`, `organizations` | Yes | No | Script Transform |
| `keywords` (array) | Yes | No | Use Transform (return array) |
| `simple string attrs` | No | Yes | Direct map or use Concat |

* * *

### Pro Tip:

If you’re ever unsure what Google expects, test it first with the **Google API Explorer** or **Postman** — see what structure it accepts, then replicate that format using Transforms in ISC.

Cheers!!!

---

<div class="post-metadata">

**Author:** ![vbdm](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/vbdm/32/26869_2.png) [@vbdm](https://developer.sailpoint.com/discuss/u/vbdm)\
**Post date:** [June 17, 2025, 4:58pm UTC](https://developer.sailpoint.com/discuss/t/how-to-provision-complex-and-multi-valued-attributes-on-google-workspace/114220/3 "2025-06-17T16:58:38Z")

</div>

Thank you @sukanta_biswas ,

I have a similar use case for phone numbers sending to Entra ID source.

I get this as part of the account response(in Postman):

```auto
        "businessPhones": [
            "+64 23 455 2366"
        ],

```

I created a transform and made sure that I constructed a similar pattern for the attribute value:

![image](https://global.discourse-cdn.com/sailpoint/original/3X/0/7/07c57f95fb940dd0ab692b2324b18a798d90f903.png)

I tried removing the double quotes as well but that also fails.

But this is still not being accepted. Any suggestions?

I am using this transform:

```auto
{
    "id": "id",
    "name": "transformWfPhone",
    "type": "static",
    "attributes": {
        "wfPhoneNumber": {
            "attributes": {
                "attributeName": "wfPhone",
                "sourceName": "success"
            },
            "type": "accountAttribute",
            "name": "Account Attribute Transform"
        },
        "value": "[\"$wfPhoneNumber\"]"
    },
    "internal": false
}

```

---

<div class="post-metadata">

**Author:** ![vbdm](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/vbdm/32/26869_2.png) [@vbdm](https://developer.sailpoint.com/discuss/u/vbdm)\
**Post date:** [June 19, 2025, 7:36pm UTC](https://developer.sailpoint.com/discuss/t/how-to-provision-complex-and-multi-valued-attributes-on-google-workspace/114220/4 "2025-06-19T19:36:43Z")

</div>

Here is my learning:

For Entra ID, the only way to make sure we send a string array is to do it in beforeProvisioning rule, like below:

```auto
							for (AttributeRequest ar : accountRequest.getAttributeRequests()) {
								if ("businessPhones".equals(ar.getName())) {
									String phone = "";
									if (ar.getValue() != null) {
										phone = ar.getValue().toString().trim();
									}
									List list = new ArrayList();
									if (!phone.isEmpty()) {
										list.add(phone);
									}
									ar.setValue(list);
								}
							}

```

But, for connectors like Epic I learned that we can do it in the provisiong policy with a static transform. Something like this:

```auto
{
          "name": "multi-valued-attribute-name",
          "transform": {
            "type": "firstValid",
            "attributes": {
              "values": [
                {
                  "attributes": {
                    "sourceName": "source_name",
                    "attributeName": "multi-valued-attribute-name"
                  },
                  "type": "accountAttribute"
                },
                {
                  "attributes": {
                    "value": ""
                  },
                  "type": "static"
                }
              ]
            }
          },
          "attributes": {
            "cloudDelimiter": ","
          },
          "isRequired": false,
          "type": "string",
          "isMultiValued": true
        }

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [August 18, 2025, 7:37pm UTC](https://developer.sailpoint.com/discuss/t/how-to-provision-complex-and-multi-valued-attributes-on-google-workspace/114220/5 "2025-08-18T19:37:09Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
