Solution for Error validating token IDX10223

Got this error today when trying to set a secret with terraform.

Error checking for presence of existing Secret keyvault.BaseClient#GetSecret: Failure responding to request: StatusCode=401 -- Original Error: autorest/azure: Service returned an error. Status=401 Code="Unauthorized" Message="Error validating token: IDX10223"

I did an az logout and then an az login and it seems to have fixed it.