{"action":"opened","issue":{"url":"https://api.github.com/repos/Azure-Samples/active-directory-dotnet-daemon-certificate-credential/issues/9","labels_url":"https://api.github.com/repos/Azure-Samples/active-directory-dotnet-daemon-certificate-credential/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/Azure-Samples/active-directory-dotnet-daemon-certificate-credential/issues/9/comments","events_url":"https://api.github.com/repos/Azure-Samples/active-directory-dotnet-daemon-certificate-credential/issues/9/events","html_url":"https://github.com/Azure-Samples/active-directory-dotnet-daemon-certificate-credential/issues/9","id":112639280,"number":9,"title":"System.Security.Cryptography.CryptographicException: Invalid provider type specified.","user":{"login":"wakurth","id":1013700,"avatar_url":"https://avatars.githubusercontent.com/u/1013700?v=3","gravatar_id":"","url":"https://api.github.com/users/wakurth","html_url":"https://github.com/wakurth","followers_url":"https://api.github.com/users/wakurth/followers","following_url":"https://api.github.com/users/wakurth/following{/other_user}","gists_url":"https://api.github.com/users/wakurth/gists{/gist_id}","starred_url":"https://api.github.com/users/wakurth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wakurth/subscriptions","organizations_url":"https://api.github.com/users/wakurth/orgs","repos_url":"https://api.github.com/users/wakurth/repos","events_url":"https://api.github.com/users/wakurth/events{/privacy}","received_events_url":"https://api.github.com/users/wakurth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-21T17:26:00Z","updated_at":"2015-10-21T17:26:00Z","closed_at":null,"body":"I'm seeing this error on the last line of this code block\r\n\r\n```cSharp\r\nClientAssertionCertificate credential = certificateFactory.GetCertificateCredential();\r\n\r\nAuthenticationContext authContext = new AuthenticationContext(settings.Authority,\r\n                    new NaiveSessionCache(userObjectIdentifier, cacheManager));\r\n\r\n// error is throw here\r\nAuthenticationResult result = authContext.AcquireToken(settings.GraphUrl, credential);\r\n```\r\n\r\nAfter a little Google-Foo, I found [this article](http://blog.johnruiz.com/2012/01/invalid-provider-type-specified-when.html)\r\n\r\nIt's not specific to this this library, but seem to be what all articles I found around this error point to.\r\n\r\nTo summarize, it seems this error happens when using certificates generated with Microsoft's new Cryptography Next Generation (CNG) based templates. I haven't read through the source code, but I'm assuming it's using the older .NET 3.5 base objects for handling certificates, and not the new .NET 4 managed implementations for CNG. \r\n\r\nAre there any plans to support CNG based certificates in this library?\r\n"}}