@cheri_masters
Can a list be generated -- yes. Is it easy or built-in -- no! Is it worth it -- up to you.
The information contained in the User Observer CSV from the provisioning report does not contain the pairing code. It contains a list of users and observers that have already been paired, not the information needed to get them paired in the first place.
The pairing codes may be available through the User Observees API. That does not provide you with a nice report, though and it looks like the observer-observee connection needs to already exist. On the other hand, when I click on Export Pairing Codes from the People page, I get a list of pairing codes for every user, even if I haven't already paired them. The expiration date for them was all 7 days from now, which means they were generated when I made the request, they weren't previous requests. That also shoots down the idea that the User Observees API will work.
I looked at the request that was made when you choose that link. It is an internal (non-API) GET call to /courses/:course_id/observer_pairing_codes.csv. In other words, visit any course and add /observer_pairing_codes.csv to the end of your course homepage and you'll get the information. You don't actually need to go to the People page and click on the link. The file will automatically download and depending on your browser settings, you may or may not need to tell it where to save the file.
When I first tried this, I got an "unauthorized" error. This was because we don't have self-registration enabled for observers. I went into our beta instance to enable that for testing purposes and we able to get it to work.
Because it's an internal call, you will need to make it from within Canvas. You cannot use their API system with a token to programmatically get the information. However, since it is a GET request, you don't need to worry about any extra authentication or csrf token like you would with a POST request. The cookie that automatically gets sent with your request is sufficient for Canvas, but that also gives you another way around the issue.
But what this really means is that you will need to go through each class and get the CSV file. Depending on how many courses you have, you may want to automate that process.
The first approach would be to go through each course and append the /observer_pairing_codes.csv to the end of the URL. If you set your browser to automatically download rather than prompting for each file, it will go faster. The problem becomes that there is no course information in the file itself. It just has Last Name, First Name, SIS ID, Pairing Code, and Expires At. The name of the file and the name of the sheet within the file contains the name of the course -- sort of. What actually appears is the course code. That can be unique, but ours are not. We use "MATH 113" as the course code for all of our Math 113 sections. We distinguish the courses with the full course title. In this case, that means we might get five courses with the same filename.
Saving them automatically may not be the best approach.
Anyway, once they are all saved, you would need some way to merge all those files into one and add the name and number of the course as well.
What you might be able to do is use an automation program like AutoHotKey (for Windows). I can take a list of numbers in a spreadsheet, copy them to the clipboard, then switch to Chrome, paste the URL needed, wait for the Save As page to appear, and then modify the name to contain the course number. It loops through all the numbers in the clipboard, all you would need is a list of current courses -- which you could get through the Admin > Settings > Reports menu.
Another approach would be to use a programming language to gather a list of the courses through the API, get the observer pairing codes from Canvas, merge in the course information, and then write it to a single file. The problem is that the list of courses is an API call (needs a token) and the observer pairing codes is not an API call (and will not accept your token). The way around this is use the Developer Tools in your browser to get a cookie from a response header. Then use that cookie in the program to authenticate the non-API call to Canvas. Browsers may make it difficult for code to extract a cookie from the browser (there are extensions that will do it, but I just copy/paste from the Developer Tools and it's quicker).
I'm not sure of your motivation in asking. Sometimes you get someone who asks "can you do this?" as a matter of curiosity and you're just looking for someone to answer that. Other times, you get told that you need this by someone who doesn't realize the difficulty in getting it. This job is fairly straightforward in what needs done, but definitely technical and needing someone who can program. It difficult to write a generic solution because the first step -- determining which courses to do this for -- may vary from institution to institution. We can use the API to get a list of all courses for a single term, but we would need to know which term to do that for and that may not be how some other institution organizes their courses.