yammer authentication from another domain - Microsoft Community


hi all,

i have following exception while trying open new connection yammer server: "carattere jolly in access-control-allow-origin non consentito quando il flag credenziali รจ impostato su true", error code sec7121,  code wrote seems in javascript/html:

<html> <head> <script type="text/javascript" data-app-id="ijf9h0pu4eiboohq1l89cw" src="https://c64.assets-yammer.com/assets/platform_js_sdk.js"></script> <script type="text/javascript"> function xdr(token, url, method, data, callback, errback) { var req; if(xmlhttprequest) { req = new xmlhttprequest(); req.withcredentials = 'true'; if('withcredentials' in req) { req.open(method, url, true); req.setrequestheader('authorization', 'bearer '+token); //req.setrequestheader('content-type', 'text/plain'); req.onerror = errback; req.onreadystatechange = function() { if (req.readystate === 4) { if (req.status >= 200 && req.status < 400) { var filename = ""; var disposition = req.getresponseheader('content-disposition'); if (disposition && disposition.indexof('attachment') !== -1) { var filenameregex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/; var matches = filenameregex.exec(disposition); if (matches != null && matches[1]) filename = matches[1].replace(/['"]/g, ''); } var type = req.getresponseheader('content-type'); var blob = new blob([req.responsetext], { type: type }); if (typeof window.navigator.mssaveblob !== 'undefined') { window.navigator.mssaveblob(blob, filename); } else { var url = window.url || window.webkiturl; var downloadurl = url.createobjecturl(blob); callback(downloadurl); settimeout(function () { url.revokeobjecturl(downloadurl); }, 100); // cleanup } } else { errback(new error('response returned non-ok status')); } } }; req.send(data); } } else { errback(new error('ie not supported')); } } function downloadfile(url){ var iframe = document.getelementbyid('yammerframe'); iframe.setattribute("src", url); } function errback(err){ alert('error! '+err); } function submitform(){ xdr('**********', 'https://api.yammer.com/api/v1/uploaded_files/36866478/download/', 'get', null, downloadfile, errback); } </script> </head> <body onload="submitform()"> <iframe id="yammerframe" name="yammerframe" src="" style="display:none"></iframe> ciao yammmer </body> </html>

can tell me if there problem of authentication on yammer server? need enter trust

between 2 sites? wich condition send request yammer server flag

withcredentials = 'true' ?

thank in advance,

nicola



Internet Explorer / Internet Explorer Unknown/Other / Windows 7



Comments

Popular posts from this blog

Windows 10 does not have any of my previous Windows 7 email address. - Microsoft Community