What happens when during the negotiation of a treaty all the members don't agree on a particular provision? For example, during the Iran deal, how did members solve their disagreements? Is there a mechanism by which differences are settled, and do all of the members need to give their approval or only a majority is required? What would happen if China or Russia disagreed on a provision while all other countries agreed to it? Do the permanent UNSC members have a veto right in these types of negotiation?
A treaty must be signed by all concerned parties. When one party does not like a specific provision of a large, multi-party treaty, they have to make a choice:
Do they dislike the provision so much that they walk away from the entire thing?
For instance, you may notice quite a lot of EU member governments that dislike one aspect or another of the EU, but very few are prepared to leave it all. Only the Brits decided to do that. The others would not abandon free travel for their citizens, and structural cohesion funds, and so on.
Once a treaty is in force, it may contain arbitration clauses to resolve disputes on how the treaty should be interpreted, but that's not really Trump's objection to the Iran treaty.
Regarding the Iran deal, the treaty was agreed by Iran, the previous US administration, and some others. Back then the US would have liked to get more but agreed to what it could get, so it agreed to the treaty.
All parties to a treaty must consent to it. If that were not the case, then a collection of countries can force any other to change its own laws against its will, which goes against national sovereignty.
If one country in a group disagrees with a part of the treaty, then those who remain have a choice to make:
- Change this part of the treaty to satisfy the concerns of this country (ex. EU-Canada Trade Deal), or
- Proceed with all other countries anyway, and exclude the one that's causing a problem (ex. Trans-Pacific Partnership)
As for the UN Security Council, no member has veto power by means of membership on the council. They can refuse to sign a treaty if they were one of the parties in the negotiation, but that wouldn't stop the other parties from signing it if they felt it made sense for them.