# Terraform: Is scope required for client grant? Why?

**URL:** <https://community.auth0.com/t/terraform-is-scope-required-for-client-grant-why/121440>\
**Category:** Get Help\
**Tags:** other, community-topic\
**Created:** [November 22, 2023, 1:53pm UTC](https://community.auth0.com/t/terraform-is-scope-required-for-client-grant-why/121440 "2023-11-22T13:53:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kievbug](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@kievbug](https://community.auth0.com/u/kievbug)\
**Post date:** [November 22, 2023, 1:53pm UTC](https://community.auth0.com/t/terraform-is-scope-required-for-client-grant-why/121440/1 "2023-11-22T13:53:23Z")

</div>

According to this [Terraform Registry](https://registry.terraform.io/providers/auth0/auth0/latest/docs/resources/client_grant) the scope is required. But my API does not really have/use any scopes? Any reason why is it required?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [November 22, 2023, 5:43pm UTC](https://community.auth0.com/t/terraform-is-scope-required-for-client-grant-why/121440/2 "2023-11-22T17:43:10Z")

</div>

Hey there @kievbug welcome to the community!

I believe the `scope` param is required simply to adhere to protocol standards (OAuth2), security best practices, etc. That being said no scope(s) (`scopes = []`) is acceptable as well.

---

<div class="post-metadata">

**Author:** ![kievbug](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@kievbug](https://community.auth0.com/u/kievbug)\
**Post date:** [November 22, 2023, 7:32pm UTC](https://community.auth0.com/t/terraform-is-scope-required-for-client-grant-why/121440/4 "2023-11-22T19:32:37Z")

</div>

Starting with v1.1 for the auth0 terraform provider, it fails if we pass empty array for the scopes parameter when we add client grant.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [November 23, 2023, 12:25am UTC](https://community.auth0.com/t/terraform-is-scope-required-for-client-grant-why/121440/5 "2023-11-23T00:25:52Z")

</div>

Hey @kievbug - You’re correct, it looks like validation was added to [prevent an empty scope param](https://github.com/auth0/terraform-provider-auth0/pull/793) - I just added a comment there just to confirm why this isn’t possibly currently.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 7, 2023, 12:26am UTC](https://community.auth0.com/t/terraform-is-scope-required-for-client-grant-why/121440/6 "2023-12-07T00:26:15Z")

</div>

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