The problem is that someone, presumably the Azure AD team, never got around to publishing this to the NuGet registry as you can see from the version history here: NuGet Registry: Microsoft.Azure.ActiveDirectory.GraphClient . This is the first time I’ve ever seen a non-existant non-private package missing form the public registry!

“But wait, my code still works when I create a new project!”

That’s right, that’s because you have a local cache of the package. But when someone else tries to use your project, because 99% of the developers out there don’t commit their package dependencies, they won’t have it.

How do you avoid this?

Thankfully this is very easy to avoid. Until the Office Developer Tools for Visual Studio get updated to fix this known issue, here’s how you can avoid it.

Immediately after running through the Add » Connected Service dialog, I’d recommend you remove the graph client v1.0.22 and install the v2.0.2 version or the most current version. Do this by opening the Package Manager Console and running the two commands below:

Extra Info

Let’s say you want to share this project with someone else like publish it to GitHub where other developers will use their own Azure AD apps. In that case before you commit the project to source control or share it, I’d recommend you do the following:

Clear the values for the ida:ClientID & ida:Password out of the web.config.

Uninstall any Office 365 related NuGet packages from your project. Find all the packages by searching for Office365 in the packages.config file. Then uninstall all of them, one-by-one.

This way, the next time someone runs through the Connected Service wizard, it will add the NuGet packages, Azure AD app to your Azure AD tenant & all references to the project.