Add username/password to a URL query that creates a CSV file?

Jason Stephens
Kilo Guru

I would like to use:

https://instance.service-now.com/change_task.do?CSV&sysparm_query=u_category=Microsoft Patch^work_startONToday@javascript:gs.daysAgoStart(0)@javascript:gs.daysAgoEnd(0)

In script on a server to pull a CSV file in. I get authentication errors. Is there a way to add a username and password to the URL so that it can be passed to Service-Now from the server?

Thanks for the help

Jason

6 REPLIES 6

What do you mean by "desired results"? The credentials you are passing still need access to the tables and fields you want to export. Also note that you can specify the view to control which fields are exported.


I took away all roles to test. When I did that, the query didn't work at all. I added the "itil" role and we were able to see a few fields but not all. We weren't able to see everything we needed until I gave the ID fll admin rights. That's what I mean by desired results.

I'm not really concerned with the data they are able to pull with the URL (the view) as much as I am somebody going "hmmmm. Wonder if I can use this ID to get into the system?" and manually logging in. At that point they are an admin.

I'll play around with the view because I think I maybe able to work something out.

Thanks again for the help!

Jason