Home > Net >  Terraform Azure Service Principal Client Secret expiration
Terraform Azure Service Principal Client Secret expiration

Time:11-17

Is it really not possible to set the expiration date for a client secret?

I tried looking at the docs (see below), and I can't find anything other than the output of the expiration Terraform which is two years.

I can't even view the secret on Azure AD since it doesn't show up in the Client Secrets area (though this might be due to some sort of replication/eventual consistency lag).

enter image description here

enter image description here

Update:

resource "azuread_service_principal_password" "example" {
  service_principal_id = data.azuread_service_principal.example.object_id
  end_date = "2021-11-18T01:02:03Z"
}

If We try using end_date in SP password it gives the below error.

enter image description here

  • Related