Heat olive oil in a large pot over medium heat.
Add chopped onion and garlic, sauté until soft.
Add chicken breasts and cook until lightly browned.
Pour in chicken broth, then stir in beans, green chiles, oregano, cumin, and cayenne.
Bring to a boil, then reduce heat and simmer for 20–25 minutes.
Remove chicken, shred it, then return it to the pot.
Stir in chopped cilantro and salt to taste.
Serve hot topped with shredded cheese and extra cilantro if desired.