javascript - Yammer JSON SDK authenticates through ADFS in Chrome and FF, but Access Denied in IE -
we've started testing out json api using javascript sdk. have adfs set authenticate in ie , if open browser window , go our network on yammer works embedding yammer feed using embed code.
however getting issue json feed - browsers ie we'll login prompt if not logged in , take through , we'll see feed, in ie pop of access denied.
we've added assets.yammer.com/assets/platform_js_sdk.js adfs recognized source
has else had problem ie , authentication through adfs?
thanks in advance! rich
we have taken code yammer api reference , using follows:
$scope.yammerrequest = function(){ yam.platform.request({ url: "messages/in_group/1312007.json?threaded=true", //url: "messages.json?threaded=true", //url: "messages.json?threaded=true", //this 1 of many rest endpoints available method: "get", success: function (data) { //angulars $scope getting lost when inside external library // need find controller, can use $scope //get controller var controllerelement = document.queryselector('[ng-controller=yammerfeedctrl]') //use angularjs scope controller var $scope= angular.element(controllerelement).scope(); //get messages data $scope.yammerfeed = data $scope.convertdatestringstodates($scope.yammerfeed) $scope.loaded = true //make sure apply changes reflected gui $scope.$apply(); }, error: function (user) { alert("there error request."); } }); } var init = function () { $scope.selectuser($scope.yammerusers[0]) //all javascript interaction need done via thier sdk //login yammer //yam.platform.login() //yam.connect.loginbutton('#yammer-login', function (resp) { if (resp.authresponse) { document.getelementbyid('yammer-login').innerhtml = 'welcome yammer!'; } }); // url: https://www.yammer.com/oauth2/access_token.json?client_id=[:client_id]&client_secret=[:client_secret]&code=[:code] //check login status yam.getloginstatus( function(response) { if (response.authresponse) { //if logged in //request massages yammer var controllerelement = document.queryselector('[ng-controller=yammerfeedctrl]') //use angularjs scope controller var $scope= angular.element(controllerelement).scope(); $scope.yammerrequest(); } else { //alert("not logged in") //all javascript interaction need done via thier sdk //login yammer yam.platform.login( function(response){ if (response.authresponse) { //var controllerelement = document.queryselector('[ng-controller=yammerfeedctrl]') ////use angularjs scope controller //var $scope= angular.element(controllerelement).scope(); //$scope.yammerrequest(); yam.getloginstatus( function(response) { if (response.authresponse) { yam.platform.request({ //url: "messages.json?threaded=true", url: "messages/in_group/1312007.json?threaded=true", //url: "messages.json?threaded=true", //this 1 of many rest endpoints available method: "get", success: function (data) { //angulars $scope getting lost when inside external library // need find controller, can use $scope //get controller var controllerelement = document.queryselector('[ng-controller=yammerfeedctrl]') //use angularjs scope controller var $scope= angular.element(controllerelement).scope(); //get messages data $scope.yammerfeed = data $scope.convertdatestringstodates($scope.yammerfeed) $scope.loaded = true //make sure apply changes reflected gui $scope.$apply(); }, error: function (data, data1, data2) { alert(data.statustext); } }); } });
whoops - forgot post answer - update2 has info on solution - need have in same security zone.
Comments
Post a Comment