Being denied credit does not effect your credit rating; rather, it is the act of applying for the credit, that creates an "inquiry" on your credit report, that can have a negative impact on your credit rating. Whenever you apply for credit, the lender with whom you have applied will request a copy of your credit report and credit score from one or more of the three major credit reporting bureaus (Equifax, Experian and TransUnion). These inquiries are taken into consideration when your credit score is calculated, and while excessive inquiries can negatively influence your score, they generally do not lower your score enough to cause significant problems when obtaining credit.
If you need to obtain credit, you will have no choice but to apply, regardless of the potential negative impact on your score. Bills.com has a wealth of information on credit to learn more about credit and how it impacts your ability to get loans.
If you are shopping around for credit, such as a mortgage, a car loan, or a credit card with the best interest rate, you should plan to complete all of your applications in a relatively short period. The credit bureaus' scoring models purport to be able to distinguish between those consumers who are attempting to open multiple lines of credit and those who are simply shopping around for the best deal. The bureaus do this by grouping inquiries for a single purpose, such as inquiries from auto finance companies, within a certain period of time into a single inquiry instead of multiple individual inquiries. The time frame used for the groupings varies between scoring models; FICO currently uses a 45-day "shopping" period. For example, if you apply for a lease with 50 different lessors within a 45-day period, all 50 inquiries created when the lessors pull your credit would count as a single "shopping" inquiry. This single inquiry may slightly ding your credit, but certainly not as much as 50 individual inquiries would damage your score. When you view your credit report, you will see individual inquiries, but the inquiries will be lumped together when your credit score is calculated.
Of course, we all know that credit reports are not perfect, so while in theory the bureaus will lump all inquiries for the same purpose together, it does not always work as desired. So, my recommendation is to shop freely, but only actually apply with lessors from whom you actually would want to rent. The fewer inquiries during the shopping period, the less likely an error will occur. Once you have obtained the financing you need, obtain a copy of your credit report and credit score to make sure that the inquiries from your shopping episode are appearing properly and that your credit score has not dropped significantly. If your score has dropped significantly, it may be a sign that the inquiries are not being properly grouped by the bureaus, and you may want to file a dispute with the bureau(s) in question: