I wanted to do something (I thought) was simple. But my testing shows that listing the entities from a class of Administrative Division only works in certain specific cases.
The bug is that the 4th class of AdministrativeDivision always fails.

Also why there are 4 different classes for this makes one wonder.
Given this very simple initial example from the help for EntityList[]
EntityList[EntityClass["Country", "Countries"]] // Shallow
The obvious change....Something like this fails miserably
EntityList[EntityClass["AdministrativeDivision", "States"]]
So first check the known entity classes
EntityClassList["AdministrativeDivision"]
From just reading this list it looks like the following entries might work 4th, 5th, 13th and 85th. These are:
{EntityClassList["AdministrativeDivision"][[#]],
EntityClassList["AdministrativeDivision"][[#, 2]]} &@85
{EntityClassList["AdministrativeDivision"][[#]],
EntityClassList["AdministrativeDivision"][[#, 2]]} &@13
{EntityClassList["AdministrativeDivision"][[#]],
EntityClassList["AdministrativeDivision"][[#, 2]]} &@4
{EntityClassList["AdministrativeDivision"][[#]],
EntityClassList["AdministrativeDivision"][[#, 2]]} &@5
I have dumped these together with the internal name given that I have not found a consistent way to tell when the entity name (rendered in a pretty box in the front-end) will work with a function and when the internal name is required.Indeed this experiment shows that the entity name never works for these cases.
what is left is to replace each of these into the simple command above replacing "States"
.
In this case, none of the entities work and the internals work on each of these except the 4th class entry. The error message (Missing["UnknownEntityClass",
) would lead you to believe that you supplied an invalid class. Of course that is misleading and should be improved (if possible).
The test cases can be run below.
EntityList[
EntityClass["AdministrativeDivision",
EntityClassList["AdministrativeDivision"][[13]]]]
EntityList[
EntityClass["AdministrativeDivision",
EntityClassList["AdministrativeDivision"][[13, 2]]]]
EntityList[
EntityClass["AdministrativeDivision",
EntityClassList["AdministrativeDivision"][[4]]]]
EntityList[
EntityClass["AdministrativeDivision",
EntityClassList["AdministrativeDivision"][[4, 2]]]]
EntityList[
EntityClass["AdministrativeDivision",
EntityClassList["AdministrativeDivision"][[85]]]]
EntityList[
EntityClass["AdministrativeDivision",
EntityClassList["AdministrativeDivision"][[85, 2]]]]
EntityList[
EntityClass["AdministrativeDivision",
EntityClassList["AdministrativeDivision"][[5]]]]
EntityList[
EntityClass["AdministrativeDivision",
EntityClassList["AdministrativeDivision"][[5, 2]]]]
Attachments: