{"action":"created","issue":{"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-dotnet/issues/497","repository_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-dotnet","labels_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-dotnet/issues/497/labels{/name}","comments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-dotnet/issues/497/comments","events_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-dotnet/issues/497/events","html_url":"https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/issues/497","id":166451982,"number":497,"title":"Missing Resources after installing ADAL package with Xamarin.Forms","user":{"login":"benrbray","id":221963,"avatar_url":"https://avatars.githubusercontent.com/u/221963?v=3","gravatar_id":"","url":"https://api.github.com/users/benrbray","html_url":"https://github.com/benrbray","followers_url":"https://api.github.com/users/benrbray/followers","following_url":"https://api.github.com/users/benrbray/following{/other_user}","gists_url":"https://api.github.com/users/benrbray/gists{/gist_id}","starred_url":"https://api.github.com/users/benrbray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benrbray/subscriptions","organizations_url":"https://api.github.com/users/benrbray/orgs","repos_url":"https://api.github.com/users/benrbray/repos","events_url":"https://api.github.com/users/benrbray/events{/privacy}","received_events_url":"https://api.github.com/users/benrbray/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-19T22:27:23Z","updated_at":"2016-07-21T16:07:31Z","closed_at":"2016-07-21T00:11:59Z","body":"I am developing a Xamarin.Forms PCL mobile application and need access to an internal API that requires authentication via Azure.  My coworker gave me a code snippet that works in a console application, and I am attempting to adapt it for my mobile application.\r\n\r\nI am able to successfully add the [ADAL package](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/3.5.207081303-alpha) to the PCL.  However, authentication requires that I pass along a set of `PlatformParameters` for each platform-specific version.  When I attempt to add the ADAL package to the Xamarin.Android project, I get the following errors in my `Resource.Designer.cs` file:\r\n\r\n```\r\nERROR: 'Resource.Id' does not contain a definition for 'agentWebView'\r\nERROR: 'Resource.Layout' does not contain a definition for 'WebAuthenticationBroker'\r\n````\r\n\r\nThe relevant (auto-generated) lines of code in `Resource.Designer.cs` are:\r\n\r\n````\r\nglobal::Microsoft.Experimental.IdentityModel.Clients.ActiveDirectory.Resource.Id.agentWebView = global::MissionControlAuth.Droid.Resource.Id.agentWebView;\t        global::Microsoft.Experimental.IdentityModel.Clients.ActiveDirectory.Resource.Layout.WebAuthenticationBroker = global::MissionControlAuth.Droid.Resource.Layout.WebAuthenticationBroker;\r\n````\r\n\r\nThe names of these missing resources suggest that I need to point the ADAL package to a webview that can be used to display a login page to the user.  Unfortunately, I haven't been able to find any mention of this on StackOverflow or on the Xamarin forums.  How can I correctly set up the ADAL package for my Xamarin.Forms PCL?\r\n\r\n**Platform / Library Versions**\r\n\r\n - .NET Framework 4.5\r\n - Xamarin.Forms v2.0.0.6482 targeting Xamarin.Android and UWP\r\n - Visual Studio 2015\r\n - Microsoft.IdentityModel.Clients.ActiveDirectory v3.5.207081303-alpha ([relevant answer](https://forums.xamarin.com/discussion/56749/cannot-add-active-directory-authentication-library-package-to-xamarin-forms-and-droid-application))\r\n     - *Alternatively*, Microsoft.Experimental.IdentityModel.Clients.ActiveDirectory v4.0.209160138-alpha ([relevant answer](http://stackoverflow.com/questions/33028388/correct-adal-package-for-b2c-xamarin-pcl-project))\r\n\r\n**Steps to Reproduce**\r\n\r\n1. Create a new Xamarin.Forms PCL project.\r\n2. Choose one of the ADAL package versions above and add it to the PCL.\r\n3. Add the same package version to the Xamarin.Android project.  The library will install successfully, but there will be missing resource errors in the \"Error List\" tab in Visual Studio."},"comment":{"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-dotnet/issues/comments/234302251","html_url":"https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/issues/497#issuecomment-234302251","issue_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-dotnet/issues/497","id":234302251,"user":{"login":"benrbray","id":221963,"avatar_url":"https://avatars.githubusercontent.com/u/221963?v=3","gravatar_id":"","url":"https://api.github.com/users/benrbray","html_url":"https://github.com/benrbray","followers_url":"https://api.github.com/users/benrbray/followers","following_url":"https://api.github.com/users/benrbray/following{/other_user}","gists_url":"https://api.github.com/users/benrbray/gists{/gist_id}","starred_url":"https://api.github.com/users/benrbray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benrbray/subscriptions","organizations_url":"https://api.github.com/users/benrbray/orgs","repos_url":"https://api.github.com/users/benrbray/repos","events_url":"https://api.github.com/users/benrbray/events{/privacy}","received_events_url":"https://api.github.com/users/benrbray/received_events","type":"User","site_admin":false},"created_at":"2016-07-21T16:07:30Z","updated_at":"2016-07-21T16:07:30Z","body":"Like I said in my original post, I've also tried the non-experimental ADAL v3.5.207081303-alpha version, and the same errors occur.  From the MSAL documentation, it looks like there is no way to authenticate against an existing Azure AD, an instead a new project must be configured from an MSAL-specific dashboard.\r\n\r\nThe errors I mentioned are also a bit cryptic--why did the packages (both experimental and not) install correctly if they aren't supported?"}}
{"actor":{"display_login":"benrbray"}}