{"action":"closed","issue":{"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-js/issues/378","repository_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-js","labels_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-js/issues/378/labels{/name}","comments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-js/issues/378/comments","events_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-js/issues/378/events","html_url":"https://github.com/AzureAD/azure-activedirectory-library-for-js/issues/378","id":174735463,"number":378,"title":"Authentication when clientId and Resource are not the same.","user":{"login":"jcc1983jcc","id":17454764,"avatar_url":"https://avatars.githubusercontent.com/u/17454764?v=3","gravatar_id":"","url":"https://api.github.com/users/jcc1983jcc","html_url":"https://github.com/jcc1983jcc","followers_url":"https://api.github.com/users/jcc1983jcc/followers","following_url":"https://api.github.com/users/jcc1983jcc/following{/other_user}","gists_url":"https://api.github.com/users/jcc1983jcc/gists{/gist_id}","starred_url":"https://api.github.com/users/jcc1983jcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcc1983jcc/subscriptions","organizations_url":"https://api.github.com/users/jcc1983jcc/orgs","repos_url":"https://api.github.com/users/jcc1983jcc/repos","events_url":"https://api.github.com/users/jcc1983jcc/events{/privacy}","received_events_url":"https://api.github.com/users/jcc1983jcc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-js/labels/User%20Reported","name":"User Reported","color":"fbca04"}],"state":"closed","locked":false,"assignee":{"login":"tushargupta51","id":803796,"avatar_url":"https://avatars.githubusercontent.com/u/803796?v=3","gravatar_id":"","url":"https://api.github.com/users/tushargupta51","html_url":"https://github.com/tushargupta51","followers_url":"https://api.github.com/users/tushargupta51/followers","following_url":"https://api.github.com/users/tushargupta51/following{/other_user}","gists_url":"https://api.github.com/users/tushargupta51/gists{/gist_id}","starred_url":"https://api.github.com/users/tushargupta51/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tushargupta51/subscriptions","organizations_url":"https://api.github.com/users/tushargupta51/orgs","repos_url":"https://api.github.com/users/tushargupta51/repos","events_url":"https://api.github.com/users/tushargupta51/events{/privacy}","received_events_url":"https://api.github.com/users/tushargupta51/received_events","type":"User","site_admin":false},"assignees":[{"login":"tushargupta51","id":803796,"avatar_url":"https://avatars.githubusercontent.com/u/803796?v=3","gravatar_id":"","url":"https://api.github.com/users/tushargupta51","html_url":"https://github.com/tushargupta51","followers_url":"https://api.github.com/users/tushargupta51/followers","following_url":"https://api.github.com/users/tushargupta51/following{/other_user}","gists_url":"https://api.github.com/users/tushargupta51/gists{/gist_id}","starred_url":"https://api.github.com/users/tushargupta51/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tushargupta51/subscriptions","organizations_url":"https://api.github.com/users/tushargupta51/orgs","repos_url":"https://api.github.com/users/tushargupta51/repos","events_url":"https://api.github.com/users/tushargupta51/events{/privacy}","received_events_url":"https://api.github.com/users/tushargupta51/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-09-02T11:10:11Z","updated_at":"2016-09-22T21:25:50Z","closed_at":"2016-09-22T21:25:50Z","body":"Hello,\r\n\r\nI'm using your adal authentication in javascript to use the token to connect to a WCF service.\r\nThe Client and the resource/Audience are not the same azure application in my system.\r\n\r\nI get the token, but when I try to authenticate it against my WCF Service I get this error:\r\n\r\nUser connection not authorized\r\nThe exception error was 'IDX10214:Audience validation failed.\r\nAudiences: '-------[clientId]'. Did not match:\r\nvalidationParameters.ValidateAudience: 'http://....[loginResource]/' or validationParameters.ValidAudiences: 'null'\".\r\n\r\nThat is, althought I'm setting the resource/audience on the config, when I get the token, the token is obtained against the \"clientId\" audience and not against the \"loginResource\"\r\n\r\nI'm obtaining the token this way:\r\nauthContext._getItem(\"adal.idtoken\")\r\n\r\nBecause this:\r\nauthContext.acquireToken(authContext.config.loginResource, function (error, token) {alert(token)})\r\nis returning null.\r\n\r\nIs there any option to do authentication with a clientId differente than the resource like I have in the c# implementation?\r\nthe c# implementation is this:\r\ntoken = _authenticationContext.AcquireToken(_serverResourceId, _clientId, _redirectUri, PromptBehavior.Auto);\r\n\r\nThanks,\r\n\r\nJC"}}
{"actor":{"display_login":"tushargupta51"}}