Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Is there a capability of customizing or creating a custom User Access denied dialog? We want to send unauthorized users to a specific corporate page or custom link.
Solved! Go to Solution.
@Anonymous
Currently, the built-in features do not provide the functionality you describe directly, but you can check out the following posts with the same doubts to find a way to get closer to your idea:
If you do not consider using the functions provided by the report server directly, you can use the following methods to implement your idea, provided that you are familiar with JavaScript or configure the reverse proxy of the website:
If you have a custom front-end portal that users access before reaching Power BI Report Server, you can implement JavaScript to handle the redirection for unauthorized users. This approach assumes that your users log in via this custom portal.
Detecting 401 Unauthorized Error and Redirecting:
fetch('http://your-pbi-server/report')
.then(response => {
if (response.status === 401) {
// Redirect to custom access denied page
window.location.href = 'http://your-corporate-page.com/access-denied';
} else {
// Proceed with normal operations
return response.text();
}
})
.then(data => {
// Process and display report data
document.getElementById('report-container').innerHTML = data;
})
.catch(error => {
console.error('Error fetching report:', error);
});
Using a reverse proxy allows you to intercept and modify HTTP requests and responses before they reach Power BI Report Server. This approach works well in environments where you want a centralized solution.
If you are using Nginx as your reverse proxy, you can configure it to redirect users who receive a 401 Unauthorized response.
Install and configure Nginx on your server.
Edit your Nginx configuration file (e.g., /etc/nginx/sites-available/default) to include the following:
server {
listen 80;
server_name your-pbi-server.com;
location / {
proxy_pass http://localhost:8080; # Your Power BI Report Server address
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Intercept 401 responses and redirect to a custom page
error_page 401 = @access_denied;
}
location @access_denied {
return 302 http://your-corporate-page.com/access-denied;
}
}
Restart Nginx to apply the changes:
sudo systemctl restart nginx
If I have answered your question, please mark my reply as solution and kudos to this post, thank you!
Thank you for your quick response. These are both possible solutions that I will be looking into. Being that, I will accept as a solution. Thank you again!
@Anonymous
Currently, the built-in features do not provide the functionality you describe directly, but you can check out the following posts with the same doubts to find a way to get closer to your idea:
If you do not consider using the functions provided by the report server directly, you can use the following methods to implement your idea, provided that you are familiar with JavaScript or configure the reverse proxy of the website:
If you have a custom front-end portal that users access before reaching Power BI Report Server, you can implement JavaScript to handle the redirection for unauthorized users. This approach assumes that your users log in via this custom portal.
Detecting 401 Unauthorized Error and Redirecting:
fetch('http://your-pbi-server/report')
.then(response => {
if (response.status === 401) {
// Redirect to custom access denied page
window.location.href = 'http://your-corporate-page.com/access-denied';
} else {
// Proceed with normal operations
return response.text();
}
})
.then(data => {
// Process and display report data
document.getElementById('report-container').innerHTML = data;
})
.catch(error => {
console.error('Error fetching report:', error);
});
Using a reverse proxy allows you to intercept and modify HTTP requests and responses before they reach Power BI Report Server. This approach works well in environments where you want a centralized solution.
If you are using Nginx as your reverse proxy, you can configure it to redirect users who receive a 401 Unauthorized response.
Install and configure Nginx on your server.
Edit your Nginx configuration file (e.g., /etc/nginx/sites-available/default) to include the following:
server {
listen 80;
server_name your-pbi-server.com;
location / {
proxy_pass http://localhost:8080; # Your Power BI Report Server address
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Intercept 401 responses and redirect to a custom page
error_page 401 = @access_denied;
}
location @access_denied {
return 302 http://your-corporate-page.com/access-denied;
}
}
Restart Nginx to apply the changes:
sudo systemctl restart nginx
If I have answered your question, please mark my reply as solution and kudos to this post, thank you!
User | Count |
---|---|
5 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
6 | |
4 | |
4 | |
3 | |
2 |