
JoeF.03368 (Customer) asked a question.
- <script> var settings = { url: "https://DOMAIN.okta.com/api/v1/users/me", type: 'GET', dataType: 'json', contentType: 'application/json', xhrFields: { withCredentials: true }, success: function (data) { // alert(JSON.stringify(data)); }, error: function(err){ window.location.href = "https://DOMAIN.okta.com/home/bookmark/0oadano3z5BduiJwm0x7/2557"; } } jQuery.ajax(settings).done(function (success) { // console.log(success); // debugging var raw = success.profile.login; var email = raw.toLowerCase(); var $login = email.replace(/@[^@]+$/, ''); jQuery('#write-data').append($login); // console.log(jQuery('.tableauViz')); // debugging jQuery('#username_filter').attr('value', 'theUsername='+$login); // load xxxx viz javascript to turn placeholder into xxxx dashboard var script = document.createElement('script'); script.type='text/javascript'; script.src = 'http://dashboard1.DOMAIN.com/javascripts/api/viz_v1.js'; jQuery('body').append(script); }) </script>
Any insight would be great. Thanks.
Hey,
I have made an inquiry with our Developer side about the code and the flow, there are some followp questions about this :1. In which browser is the error occurring? Is it a private window or a standard one? Is the 3rd party cookies allowed always in the browser in which the error occurs? What is the behavior in other browsers?2. Could you check if 'sid' cookie is set in the request headers in the call /api/v1/users/me? Best Regardstype: 'GET',
dataType: 'json',
contentType: 'application/json',
xhrFields: {
withCredentials: true }