diff --git a/internal/provider/data_source_all_users.go b/internal/provider/data_source_all_users.go index 0970ffc..c28c0cb 100644 --- a/internal/provider/data_source_all_users.go +++ b/internal/provider/data_source_all_users.go @@ -109,7 +109,7 @@ func (d *AllUsersDataSource) Read(ctx context.Context, req datasource.ReadReques if !user.Deleted && !user.IsBot { resultingList = append(resultingList, AllUsersDataSourceModelUserItem{ ID: types.StringValue(user.ID), - Name: types.StringValue(user.Profile.RealName), + Name: types.StringValue(user.Name), Email: types.StringValue(user.Profile.Email), }) } diff --git a/internal/provider/data_source_user.go b/internal/provider/data_source_user.go index f263932..163fceb 100644 --- a/internal/provider/data_source_user.go +++ b/internal/provider/data_source_user.go @@ -117,7 +117,7 @@ func (d *UserDataSource) Read(ctx context.Context, req datasource.ReadRequest, r } data.Email = types.StringValue(user.Profile.Email) - data.Name = types.StringValue(user.Profile.DisplayNameNormalized) + data.Name = types.StringValue(user.Name) data.ID = types.StringValue(user.ID) tflog.Trace(ctx, "Fetched Slack user data", map[string]any{"id": user.ID})