There is no *direct* object. The entire phrase, “for the secretary but not for the students” is the predicate. “The secretary” and “the students” are objects of the preposition “for”.
Other than a prepositional object, “to be” can also take a predicate nominative. Let’s take a look at another sentence: “They are the people.” Once again, there is no direct object. “The people” is a predicate nominative. We could just theoretically say “The people are they.” Here’s another example, illustrating the use of nominative pronouns in the predicate: “I am he” and “He is I.” Note that in spoken English, you’ll usually hear the object pronouns in the predicate, even thought the nominative (subject) pronouns are officially correct: “I’m him” and “He’s me”.
Let me know if this answered your question.