# Jira Cloud: GET and CREATE Team with script

**URL:** <https://community.exalate.com/t/jira-cloud-get-and-create-team-with-script/5253>\
**Category:** General Questions\
**Tags:** jira-cloud, migrated\_question\
**Created:** [November 4, 2024, 7:53am UTC](https://community.exalate.com/t/jira-cloud-get-and-create-team-with-script/5253 "2024-11-04T07:53:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:53am UTC](https://community.exalate.com/t/jira-cloud-get-and-create-team-with-script/5253/1 "2024-11-04T07:53:41Z")

</div>

_Originally asked by Oleksandra Honcharenko on 06 July 2022 [(original question)](https://oldcommunity.exalate.com/questions/58491970)_

* * *

Hello. I am working with Jira Cloud and I need to synchronise the Team field(as I understand this field is from Portfolio, also it`s locked in the configuration menu). Customers want it to be dynamic: when we add new Team to another project(on the ADO side) and this new Team is added to a synchronised issue we should be able to fetch all Teams on Jira side to search for new Team and if script can`t find new Team it should add it to Jira.  
I tried some API requests (like GET /rest/api/3/field/{fieldId}/context/{contextId}/option)but they don`t work. How can I do this?

 ![](https://europe1.discourse-cdn.com/flex018/uploads/exalate1/original/1X/f50323b788f5c7f58df9d6b6f3b19e754e603e51.png) ![](https://europe1.discourse-cdn.com/flex018/uploads/exalate1/original/1X/1de69bdc4a527f873bb71db513a5ad4378352b76.png) ![](https://europe1.discourse-cdn.com/flex018/uploads/exalate1/original/1X/40286f4c7a5c4042b45deb6ee284d5039c075a32.png)

* * *

[Failed to download attachment: attachment\_58491970\_114229\_Screenshot+from+2022-07-05+00-33-23.png. Error: 401 Client Error: for url: [Service Management](https://support.idalko.com/servicedesk/customershim/secure/attachment/114229/114229_Screenshot+from+2022-07-05+00-33-23.png?fromIssue=136175)]

[Failed to download attachment: attachment\_58491970\_114230\_Screenshot+from+2022-07-05+00-34-40.png. Error: 401 Client Error: for url: [Service Management](https://support.idalko.com/servicedesk/customershim/secure/attachment/114230/114230_Screenshot+from+2022-07-05+00-34-40.png?fromIssue=136175)]

[Failed to download attachment: attachment\_58491970\_114231\_Screenshot+from+2022-07-05+12-19-40.png. Error: 401 Client Error: for url: [Service Management](https://support.idalko.com/servicedesk/customershim/secure/attachment/114231/114231_Screenshot+from+2022-07-05+12-19-40.png?fromIssue=136175)]

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:53am UTC](https://community.exalate.com/t/jira-cloud-get-and-create-team-with-script/5253/2 "2024-11-04T07:53:42Z")

</div>

_Answer by Jose Pablo Alpizar Hidalgo on 13 July 2022_

Please reference the following article to review the scrip details:  
[https://docs.idalko.com/exalate/x/iQR1Aw](https://docs.idalko.com/exalate/x/iQR1Aw)  
and let mw know if it’s helpful.

* * *
