ERROR: AADSTS530003: Your device is required to be managed to access this resource

I’m on Ubuntu Linux 22.04, trying to use Terraform with Azure. However, when I attempt
$ terraform plan, I get the following error:

Planning failed. Terraform encountered an error while generating this plan.

│ Error: building account: could not acquire access token to parse claims: running Azure CLI: exit status 1: ERROR: AADSTS530003: Your device is required to be managed to access this resource.
│ Trace ID: 68a62210-cc70-43ae-aa12-cce925b21b01
│ Correlation ID: d77f8e3a-c135-41a8-94bb-4fe901e531b1
│ Timestamp: 2023-10-09 11:56:19Z
│ Interactive authentication is needed. Please run:
│ az login --scope https://graph.microsoft.com/.default

│ with provider[“Terraform Registry”],
│ on providers.tf line 11, in provider “azurerm”:
│ 11: provider “azurerm” {

The interactive login flow suggested to me is broken on my platform, but in any case, I was already logged in when issuing the command. Logging in once more does not make a difference.

Can this be because of policy settings on our enterprise Azure account? I find it strange, since I am able to create and list resources via az cli.

Some more info about my environment:

$ az --version
azure-cli                         2.53.0

core                              2.53.0
telemetry                          1.1.0

Extensions:
azure-cli-iot-ext                 0.8.10

Dependencies:
msal                            1.24.0b2
azure-mgmt-resource             23.1.0b2

Python location '/opt/az/bin/python3'
Extensions directory '/home/palev/.azure/cliextensions'

Python (Linux) 3.10.10 (main, Sep 20 2023, 06:07:38) [GCC 11.4.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
$ terraform --version
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.75.0