I am able to generate a url for dashboard using generate_embed_url_for_registered_user() method from quicksight api and the url can be opened by anyne across the browser. I want the url to be user specific and when I am adding the user in quicksight on au

import boto3

def get_dashboard_embed_url(account_id, dashboard_id, region):
quicksight = boto3.client(‘quicksight’, region_name=region, aws_access_key_id=‘xxxxxxxxxx’, aws_secret_access_key=‘xxxxxxxxxxxxxxxx’)
response = quicksight.get_dashboard_embed_url(
AwsAccountId=account_id,
DashboardId=dashboard_id,
IdentityType=‘IAM’,
Namespace=‘default’,
SessionLifetimeInMinutes=20 # Session duration for the URL
)
return response[‘EmbedUrl’]
I am able to generate a url for dashboard using generate_embed_url_for_registered_user() method from quicksight api and the url can be opened by anyne across the browser. I want the url to be user specific and when I am adding the user in quicksight on author level I am able to see only the dashboard not able to create it. Please give me a solution to trouble shoot this. It would be a great help to me.

Replace these values with your AWS account ID, dashboard ID, and region

aws_account_id = ‘xxxxxxxxxx’
dashboard_id = ‘xxxxxxxxxx’
aws_region = ‘ap-south-1’

Get the dashboard URL

dashboard_url = get_dashboard_embed_url(aws_account_id, dashboard_id, aws_region)
print(“Dashboard URL:”, dashboard_url)

Hello @SakethKesari !

Can you try changing the your target user to have admin access rather than just author level permissions if you want them to be able to create the dashboards?

I believe the author permissions will allow you to view but not edit or create a dashboard.

Author means he will be able to add additional feautures to the dashboard right. Yeah I have tried your approach it is not working.

@SakethKesari ,

Add a few screenshots
1/the generate_embed_url_for_registered_user API ( generate_embed_url_for_registered_user - Boto3 1.34.64 documentation )
2/what you see when the embed link is opened in the browser
3/QuickSight role : Reader = View dashboards , Author = create and share
4/Validate that you are passing the UserArn=‘string’ as part of the API call is a QuickSight user who is an Author

Kind regards,
Koushik

1 Like

Hello @SakethKesari !

Have you tried @Koushik_Muthanna 's suggestion?

Hi @duncan I have tried in this by changing Identity type to QUICKSIGHT and giving user arn in quicksight arn format like this “arn:aws:quicksight:region:account-id:user/default/user-name”. When I executed it, it generated url in view format only. Actually Iw as using free tier resources that is the reason why it is showing the dashboard in read only format here it ll charge 0.3 dollar per session for reader only. If we want author privilleges then we have to add a author subscription where you have 24 dollars month to month for each author. I also want to mention that I have posted a new question can you please check that and reply with your knowledge that would be a great help for me