Run report permission problem #8315

Closed
opened 2025-12-29 20:35:15 +01:00 by adam · 4 comments
Owner

Originally created by @grethler on GitHub (Jul 10, 2023).

NetBox version

v3.4.4

Python version

3.11

Steps to Reproduce

  1. create user token that hast all permissions aswell as the 'run' permission.
  2. post a requests to https://$tenant$/api/extras/reports/$report$/run/

Expected Behavior

Successful run

Observed Behavior

This user does not have permission to run reports.

Originally created by @grethler on GitHub (Jul 10, 2023). ### NetBox version v3.4.4 ### Python version 3.11 ### Steps to Reproduce 1. create user token that hast all permissions aswell as the 'run' permission. 2. post a requests to https://$tenant$/api/extras/reports/$report$/run/ ### Expected Behavior Successful run ### Observed Behavior This user does not have permission to run reports.
adam added the type: bugstatus: revisions needed labels 2025-12-29 20:35:15 +01:00
adam closed this issue 2025-12-29 20:35:15 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 10, 2023):

Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.

@jeremystretch commented on GitHub (Jul 10, 2023): Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.
Author
Owner

@jeremystretch commented on GitHub (Jul 10, 2023):

Please post the entire API request. Also note that you're on v3.4.4 which is rather old.

@jeremystretch commented on GitHub (Jul 10, 2023): Please post the entire API request. Also note that you're on v3.4.4 which is rather old.
Author
Owner

@grethler commented on GitHub (Jul 11, 2023):

Update is in progress.
More information:

  1. Add token to user via Admin > Users > Token
  2. Add Permission to that said user via Admin > Users > Permissions (view, add, change, delete and run)(object types: "Extras > Report")
  3. Use the following script for the api call:
    `
    TOKEN = ''
    TENANT = ''

import requests
header = {'Authorization':TOKEN}

rep = requests.get(f'https://{TENANT}/api/extras/reports/', headers=header)
for i in rep.json():
srep = requests.post(f"{i['url']}run/", headers=header)
print(f"Running report: {i['url'][:-1].split('/')[-1]}")
if str(srep.json()) == "{'detail': 'This user does not have permission to run reports.'}":
print('No permission to run report')
else:
print('Report run successfully.')
`

Expected Behaviour: Report run successfully.
Observed Behaviour: No permission to run report.

@grethler commented on GitHub (Jul 11, 2023): Update is in progress. More information: 1. Add token to user via Admin > Users > Token 2. Add Permission to that said user via Admin > Users > Permissions (view, add, change, delete and run)(object types: "Extras > Report") 3. Use the following script for the api call: ` TOKEN = '' TENANT = '' import requests header = {'Authorization':TOKEN} rep = requests.get(f'https://{TENANT}/api/extras/reports/', headers=header) for i in rep.json(): srep = requests.post(f"{i['url']}run/", headers=header) print(f"Running report: {i['url'][:-1].split('/')[-1]}") if str(srep.json()) == "{'detail': 'This user does not have permission to run reports.'}": print('No permission to run report') else: print('Report run successfully.') ` Expected Behaviour: Report run successfully. Observed Behaviour: No permission to run report.
Author
Owner

@kkthxbye-code commented on GitHub (Jul 11, 2023):

Are you sure you are not just running into this, which was fixed in 3.5.5?

https://github.com/netbox-community/netbox/issues/12849

Regardless, I tested on 3.5.5 and could not replicate it. It works fine with the run permission for reports.

@kkthxbye-code commented on GitHub (Jul 11, 2023): Are you sure you are not just running into this, which was fixed in 3.5.5? https://github.com/netbox-community/netbox/issues/12849 Regardless, I tested on 3.5.5 and could not replicate it. It works fine with the run permission for reports.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8315