You get the quest "Diplomatic Immunity" from Delphine after completing the quest "A Blade in the Dark". Delphine believes that dragons are coming back to life and only the Dragonborn can stop them. It turns out she was right. Near Kynesgrove, we saw a dragon shouting another one back to life. After we killed the dragon and I absorbed its power, Delphine accepted that I was Dragonborn as she had hoped, and revealed that she is one of the last members of the Blades, an organization dedicating to protecting the Dragonborn and stopping the dragons

It semms that things are worse than even Delphine thought. Dragons aren't just coming back to life, they're being resurrected by other dragons. Delphine suspects that the Thalmor might be bringing dragons back for some sinister purpose. She's going to talk to her contacts about how we can infiltrate the Thalmor Embassy.

Meet Delphine in Riverwood

Fast Travel to Riverwood and head to the Sleeping Giant Inn. She will meet you there and assure you that you weren't followed. She has a plan, so follow her into the secret hideout. She has figured out how to get you into the Thalmor Embassy. Ask her how come she is not coming. She will tell you that she would attract the wrong kind of attention. But you are unknown to the Thalmor. Ask her what is her plan to infiltrate the Thalmor Embassy. She will tell you that the Thalmor Ambassador, Elenwen, regularly throws parties for the rich and connected in the embassy. She can get you into one of those parties. Once in that party, you will go find Elenwen's secret files. She has a contact, inside the embassy. He can help you. His name is Malborn, and since he is a wood elf he has plenty of reasons to hate the Thalmor, so he can be trusted. She will have him meet you at the Winking Skeever in Solitude. While you are doing that, she will arrange you an invitation into one of Elenwen's parties. She wants you to meet her at the Solitude Stables after you've finished the business with Malborn.

You can ask her some more questions, such as what to do once you are inside the embassy. You willl have to slip away from the party without raising an alarm. Then you will need to find Elenwen's office and search her files. Malborn will point you to the right direction. Tell Delphine you will see her at solitude after meeting with Malborn.

Leave the inn and fast travel to Solitude (or hire a carriage from Whiterun). Enter the Winking Skeever. Locate Malborn sitting in one of the tables. Tell him your mutal friend sent you. He will tell you he can smuggle some equipment into the Embassy for you. He recommends not to bring anything with you as the Thalmor takes security very seriously. He wants you to give him what you can't leave without and he will get it into the embassy. Ask him what you should bring. He will suggest you bring anything that will let you move quietly and kill quickly.

You can either give him the equipment now, or tell him you need some time to gather what you need.

If you are playing a thief like class, give him equipment that will help you sneak and assassinate quickly and quietly. If you are not of the stealthy type, give him your best suit of armor as well as your most powerful weapons, along with some health, stamina and magicka potions. Then he leaves.

Go meet Delphine at the stables just outside the city to the south. Tell her Malborn's all set, you gave him the gear you wanted him to smuggle into the embassy. She has your invitation to the party. But the only way you are going to get in is if the guards believe you are one of the invited guests. She will give you party clothes and party boots. Tell her you are ready, and to keep the rest of your things safe for you. Board the carriage to the Embassy.

"I met with her contact, Malborn, who is going to smuggle some of my equipment into the Thalmor's ambassador's manor. I'm going to infiltrate the manor posing as a guest at the ambassador's party. Once inside, I need to meet up with Malborn and figure out a way to slip from the party without being caught."

You arrive at the Thalmor Embassy Northwest of Solitude. You can speak to Razelan who is also late. Approach the Thalmor Wizard. Show her your invitation. Climb the stairs and go in. Elenwen greets you. Introduce yourself, she remembers your name from the guest list. She asks you what's your business in Skyrim, and at that instance Malborn interrupts her to ask if he can uncork another wine. You can mingle with the guests who include Erikur,  Jarl Idgrod Ravencrone, Maven,  Ondolemar, and others, before approaching Malborn. He will tell you that after you create a distraction, he will open the door behind the bar and you can slip in. Your objective now is to create a distraction and get away from the party.

Talk to Razelan who is sitting at a nearby bench. Tell him he looks thirsty. Then talk to Malborn and get a drink from him, a Calovian Brandy. Give drink to Razelan. He will be very happy and ask if there is anything he can do for you. Tell him to cause a scene and to get everyone's attention for a few minutes. You could also try and ask one of the other guests to make a scene, thougt not all would agree without some persuasion. Erikur will cause a scene if you lie to him that the waitress is interested in him.  Razelan should be the easiest one to convince to cause the scene so he is the safest bet.

Once your friend creates the scene, head to the bar to Malborn and follow him through the door. He will lead you through the kitchen, telling the cook Tsavani that you are feeling ill. Let Malborn do all the talking.  Get your smuggled gear from the chest in the kitchen larder. You now need to search the Ambassador's office to find out what the Thalmor know about the dragons. Your objective is to search for infirmation about the dragons returning.
Open the door and enter the corridor, then go into the room to the right. Put on the Thalmor robes. These will let you sneak around the embassy more easily, especially if you are a high elf (but not as easy if you are Orc, Khajiit, or Argonian). Although if you are having problems getting around the mansion unnoticed, it is ok to fight and kill all the enemies.

Across the room from where you found the robes there is a bedroom with a Thalmor wizard and 2 guards. Either kill them or sneak by them, then climb the stairs and turn left at the corridor. Exit to the courtyard from the door on the SW. Go Northwest and enter through the door to Thalmor Embassy, Elenwen's Solar.

Rulindil is in the solar, a powerful mage who can summon storm Atronachs. Overhear him talking to Gissur about an interrogation cellar. If you are sneaking, you can pickpocket him for the interrogation chamber key, otherwise you can kill him. Search the chest to find a Dragon Investigation: Current Status as well as Thalmor Dossiers on Delphine and Ulfric Stormcloak. The dragon investigation document will mention a prisoner.

Go through the door of the room with the chest, then go down the stairs. Unlock the door to the dungeon with the interrogation chamber key. Climb down some more chairs and find another chest with a Thalmor Dossier: Esbern.

Brimg up your inventory and read the dragon investigation document as well as the three Thalmor Dossiers to get the information you need and complete the objective.

"I've now learned that the Thalmor are just as in the dark as us - in fact, they're searching Riften for a Blade named Esbern, who they believe knows what the return of the dragon means."

Your goal now is to escape the Thalmor Embassy. But first, open the cell door and free the tortured prisoner, Etienne Rarnis. He knows a way out. Follow him. He will take you to a trapdoor leading to a Reeking Cave. The key is held by a Thalmor soldier in the room, assuming you had killed him, loot it off his body. Work your way through the caves. There will be  a frost troll on the way, make sure you stay ahead of the prisoner so that you can kill the troll before it hurts and possibly kills the prisoner. Exit the caverns to find yourself to the west of the Thalmor Embassy, on the other side of the mountain.

Your objective now is to talk to Delphine. Fast travel to Riverwood and meet Delphine at the secret hiding place in the Sleeping Giant Inn. Tell her you learned that the Thalmor know nothing about the dragons and that they are looking for someone named Esbern. She will tell you Esbern was one of the Blades Archivists and knew a lot about Dragons. Tell her they seem to think he is hiding in Riften. She will suggest you look in the Ratways there and find a guy name Brynjolf who is well connected and would know where to find Esbern. If you are a thief and have done the Thieves Guild quest, you would have already known where to locate Brynjolf.

She will tell you Esbern is paranoid and it is hard to gain his trust. She tells you that you should ask Esbern if he remembers what happened on the 30th of Frostfall. He will know what that means.

Don't forget to get your stuff back from the chest.

This completes the quest "Diplomatic Immunity" and starts the next quest in the main story campaign, "A Cornered Rat"