Official agencies such as the military, by definition, always act in an "official capacity". It's only with individuals where we have to try to distinguish their "personal" actions from their "official" ones.
For example, an ambassador to a foreign country might ask a friend, a diplomat, to dinner at the embassy. The friend could then ask:
Am I expected to attend in my official capacity, or is this just an informal get-together?
which is to say, is the friend going there to discuss official matters of state, or is she just going to chat with her friend? Of course, being diplomats, maybe it's a little of both, and maybe there never is such a thing as a truly informal meeting. But you get the idea.
Additionally, individual officials can attend official events but not in their "official capacity", meaning that they are only there to observe or provide some kind of "unofficial" input. For example:
The chief justice sat in on the tribunal, but not in any official capacity, as he claimed he simply had a personal interest in the outcome.
You can imagine many other variations on this situation, in which someone with some kind of official power participates in an event without exercising that power.
It may be possible for some agencies of the government to act in an unofficial capacity, but this would be rare, and I really can't think of any good examples. Perhaps something like having an office from the national bank process a visa request, something normally handled by a different office ... but it's a stretch.