---
title: "Discussion on \"How to update in bulk G Suite users' custom attributes with Google Admin SDK\" | Hashnode"
description: "Discussion on \"How to update in bulk G Suite users' custom attributes with Google Admin SDK\". A scenario to use Google APIs to enable continuous management of AWS SAML federation"
url: "https://hashnode.com/posts/how-to-update-in-bulk-g-suite-users-custom-attributes-with-google-admin-sdk/5fa9051ece3a346da3199345"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to update in bulk G Suite users' custom attributes with Google Admin SDK](https://blog.leapp.cloud/how-to-update-in-bulk-g-suite-users-custom-attributes-with-google-admin-sdk?utm_source=hashnode&utm_medium=feed)

A scenario to use Google APIs to enable continuous management of AWS SAML federation

Nov 9, 2020 · 11 min read · blog.leapp.cloud  
Updated Feb 7, 2023  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#aws](https://hashnode.com/tag/aws)
-   [#google](https://hashnode.com/tag/google)

## Written by

[Nicolò Marchesi](https://hashnode.com/@pethron)

@pethron · Pavia, IT

  
[View profile](https://hashnode.com/@pethron)

Passionate cloud devops, software engineer and entrepeneur.

## Responses 1

Markdown supported · ⌘↵ to post

[James Waldrop](https://hashnode.com/@james306)

[Mar 22, 2021](https://hashnode.com/posts/how-to-update-in-bulk-g-suite-users-custom-attributes-with-google-admin-sdk/5fa9051ece3a346da3199345/comment/60590d1d5771a2129446aa4d)

Thanks for writing up this article and project. I got lost on the federation and custom schema files. Is the federation file supposed to list the accounts you want to modify? What would you do if you have a custom attribute that requires a value. For example AWS AppStream requires an attribute AWSAttribute with a multi-value field AppStreamCAD .

[Nicolò Marchesi](https://hashnode.com/@pethron)

[Mar 23, 2021](https://hashnode.com/posts/how-to-update-in-bulk-g-suite-users-custom-attributes-with-google-admin-sdk/5fa9051ece3a346da3199345/comment/60590d1d5771a2129446aa4d#reply-6059a6a95771a2129446b584)

I'm really glad you found it useful! As for your questions; yeah, the federation file is supposed to list all the accounts that you want to modify; in the case of a custom attribute, I'm afraid you need to modify the python script in order to take that into account. It's pretty simple in fact: add another field in the federation file with the data you need and change the python script to read from that attribute.

[James Waldrop](https://hashnode.com/@james306)

[Mar 23, 2021](https://hashnode.com/posts/how-to-update-in-bulk-g-suite-users-custom-attributes-with-google-admin-sdk/5fa9051ece3a346da3199345/comment/60590d1d5771a2129446aa4d#reply-605a5f1847b0d2243d4ab1e7)

[Nicolò Marchesi](https://hashnode.com/@pethron) Thank you for clarifying. I realized your script is doing exactly what I want to do, minus the Session Timeout attribute. That helped me make progress but ran into an error: "TypeError: string indices must be integers" when trying to apply values from "update\_saml\_attributes." Any ideas on where I need to start looking?
