How to use team_id in tfc secret engine

I configured terraform cloud secret engine following the doc:

vault secrets enable terraform
vault write terraform/config token=tf-token
vault write terraform/role/lh team_id="my-team-id"

I’m getting error on the last command.

Error writing data to terraform/role/lh: Error making API request.

URL: PUT https://192.168.0.5:8200/v1/terraform/role/lh
Code: 500. Errors:

* 1 error occurred:
	* error creating Terraform token: unauthorized

I am using a team that has owner permissions. Not sure what the deal is!

If I use user_id, it works. Whats the way to configure for team tokens? I also tried with curl, the same thing:

curl     --request POST     --header "X-Vault-Token: $VAULT_TOKEN"     --data @payload.json -k  $VAULT_ADDR/v1/terraform/role/tf-user 
cat payload.json
{
  "team_id": "team-id-from-ui",
  "ttl": "1h",
  "max_ttl": "24h"
}