23. In a regular octagon, three vertices are randomly chosen from the eight vertices to form a triangle. The probability that the triangle has at least one side as a side of the octagon is ( ).
(A) $\frac{2}{7}$
(B) $\frac{5}{42}$
(C) $\frac{11}{14}$
(D) $\frac{5}{7}$
(E) $\frac{6}{7}$
23. D.

If the selected triangle has at least one side as a side of the regular octagon, it indicates that at least two of the three selected points are adjacent.
If all three points are adjacent, there are 8 cases;
If exactly two points are adjacent, these two adjacent points have 8 cases, and for each case, the other point has 4 cases.

The number of ways to choose three points is $\mathrm{C}_{8}^{3}=56$, so the required probability is $\frac{8+8 \times 4}{56}=\frac{5}{7}$.