Yes, you can heat air in a microwave oven, but the appliance
isn't good at doing that. There are a few reasons for this. First,
the microwaves will most effectively only heat the water vapor in
air or water in something in the cavity (the cooking area). That
means that thermal energy transferred into water vapor or something
in the cavity that has water in it will have to be transferred to
the air to heat that air.
We also know that a microwave has a fan in it to keep the
microwave generating component cool. The air is heated as it cooles
the device, and that warm air is then ducted through the cavity and
out another side of the oven. This happens continuously. The air in
the cavity is constantly being "replaced" with other air. Heating
air in a microwave is not something the device can do well.