diff --git a/internal/provider/azure/account.go b/internal/provider/azure/account.go index 68a684c..690234e 100644 --- a/internal/provider/azure/account.go +++ b/internal/provider/azure/account.go @@ -45,11 +45,8 @@ func (p *Provider) Account() (provider.Account, bool) { user += " (service principal)" } add("user", user) - tenant := a.tenant - if a.tenantName != "" { - tenant = a.tenantName + " · " + a.tenant - } - add("tenant", tenant) + add("tenant", a.tenantName) + add("tenant ID", a.tenant) if oid := str("oid"); oid != "" { add("object ID", oid) out.Copy, out.CopyLabel = oid, "object ID" diff --git a/internal/provider/azure/account_test.go b/internal/provider/azure/account_test.go index 7027595..a951ce8 100644 --- a/internal/provider/azure/account_test.go +++ b/internal/provider/azure/account_test.go @@ -35,7 +35,7 @@ func TestAccount(t *testing.T) { got[f.Label] = f.Value } want := map[string]string{ - "name": "Alice Example", "user": "alice@contoso.com", "tenant": "Contoso · t1", + "name": "Alice Example", "user": "alice@contoso.com", "tenant": "Contoso", "tenant ID": "t1", "object ID": "11111111-2222-3333-4444-555555555555", "sign-in": "MFA · password", "roles": "Global Administrator, role aaaaaaaa", "subs": "3 · default platform", } @@ -54,7 +54,7 @@ func TestAccount(t *testing.T) { // Before any token: what az's list says. claims = nil a, _ = p.Account() - if len(a.Fields) != 3 || a.Copy != "" { + if len(a.Fields) != 4 || a.Copy != "" { t.Errorf("without a token: %+v", a) } if _, ok := (&Provider{}).Account(); ok {