Sometimes allies join an aggressive war only if you promise them land. However, in the peace deal screen, under "cede provinces", there are no options to give your allies a province; or sometimes, there are options that are greyed out with the message "can't give them that province since the ally doesn't want it". Am I doing something wrong?
Your ally only wants specific provinces, and that are provinces that they either have a claim on or have set as province of interest.
If they siege such provinces themselves, they will occupy them, allowing you to grant them those provinces in the peace deal.
With the "Art of War" DLC, you can change the occupation of provinces and give them to your ally that way.
You can see claims via the diplomatic map mode, and provinces of interest by going into the diplomatic feedback menu of the country in question.
Failing to provide enough provinces in the peace deal will significantly lower trust (up to -30), jeopardizing alliances.
You can see whether the ally considers the peace deal "fair" by looking at the small thumbs up/thumbs down symbol at their flag to the left in the pace deal screen. They will want more provinces the higher their participation score is.
Your allies only want specific provinces, namely those they have a claim or core on.
If you cannot select one of those, then none of the currently occupied provinces fulfill those criteria.
Be very careful, when promising allies land. Not fulfilling that promise is a massive trust hit (-30 if no land was given, -20 if not enough land was given), this usually means the alliance is over (Below 30 trust autobreaks the alliance), unless your ally trusted you highly before.
Use the diplomacy menu and the diplomatic map mode (select the country, green stripes outside their borders are cores, yellow stripes outside their borders are claims) to find out which provinces your ally wants.