An example operation includes one or more of determining, by a server, needed energy at a building of a plurality of buildings served by a microgrid and providing, by the server, a portion of the needed energy to the building using a priority. The portion and the priority are based on an availability of alternate sources of energy at the building as compared with alternate sources of energy at other buildings of the plurality of buildings.