You can't take a credit for the following foreign taxes.
1. Taxes paid to a foreign country that you don't legally owe, including amounts eligible for refund by the foreign country. If you don't exercise your available remedies to reduce the amount of foreign tax to what you legally owe, a credit for the excess amount isn't allowed. The amount of tax actually withheld by a foreign country isn't necessarily 100% creditable. See Regulations section 1.901-2(e)(2)(i).
Example. Country X withholds $25 of tax from a payment made to you. Under the income tax treaty between the United States and Country X, you owe only $15 and can claim a refund from Country X for the other $10. Only $15 is eligible for the foreign tax credit (whether or not you apply for a refund).
2. Taxes imposed by and paid to certain foreign countries. These countries are those designated by the Secretary of State as countries that repeatedly provide support for acts of international terrorism, countries with which the United States doesn't have or doesn't conduct diplomatic relations, or countries whose governments aren't recognized by the United States and aren't otherwise eligible to purchase defense articles or services under the Arms Export Control Act. Pub. 514 contains a list of these countries.
3. Foreign taxes withheld on a dividend from a corporation, if you haven't held the stock for at least 16 days within the 31-day period that begins 15 days before the ex-dividend date. This required holding period is greater for preferred-stock dividends attributable to periods totaling more than 366 days. See section 901(k)(3) or Pub. 514.
4. Foreign taxes withheld on a dividend to the extent that you have to make related payments on positions in substantially similar or related property.
Example. You receive a dividend subject to foreign withholding tax. You are obligated to pay someone else an amount equal to all these dividends you receive. You can't claim a foreign tax credit for the withholding tax on these dividends.
5. Foreign taxes withheld on income or gain (other than dividends) from property if you haven't held the property for at least 16 days within the 31-day period that begins 15 days before the date on which the right to receive the payment arises. See section 901(l) or Pub. 514.
6. Foreign taxes withheld on income or gain (other than dividends) from property to the extent you have to make related payments on positions in substantially similar or related property.
7. Payments of foreign tax that are returned to you in the form of a subsidy.
8. Taxes paid or accrued to a foreign country in connection with the purchase or sale of oil or gas extracted in that country if you don't have an economic interest in the oil or gas, and the purchase price or sales price is different from the fair market value of the oil or gas at the time of the purchase or sale.
9. Foreign taxes paid or accrued on income for which you are claiming an exclusion on Form 8873, Extraterritorial Income Exclusion. However, see section 943(d) for an exception for certain withholding taxes.
10. The disqualified portion of any foreign tax paid or accrued in connection with a covered asset acquisition. Covered asset acquisitions include certain acquisitions that result in a stepped-up basis for U.S. tax purposes. For more information, see section 901(m) and the temporary regulations under that section, including Treasury Decision 9800, in Internal Revenue Bulletin 2016-52 at IRS.gov/irb/2016-52_IRB/ar09.html.
11. Foreign taxes disallowed under section 965(g). You can't take a credit for any interest or penalties you must pay.