Skip to content

User Info and List Users getting permission denied after enabled SSO with O365 #32299

Answered by dosubot bot
murugesanthirumal asked this question in Q&A / Help
Discussion options

You must be logged in to vote

The error message you're encountering suggests that the add_permission_role method is expecting a PermissionView object rather than a string. Here's how you can modify the script to correctly add the permission:

  1. Find or Create the PermissionView: You need to ensure that the PermissionView object is created or retrieved before associating it with the role.

Here's an updated version of the script:

from superset import app, create_app

# Initialize the Superset app
app = create_app()

with app.app_context():
    # Get the security manager
    security_manager = app.appbuilder.sm

    # Find the Gamma role
    gamma_role = security_manager.find_role("Gamma")

    # Define the permission an…

Replies: 1 comment 14 replies

Comment options

You must be logged in to vote
14 replies
@murugesanthirumal
Comment options

@dosubot
Comment options

@murugesanthirumal
Comment options

@dosubot
Comment options

Answer selected by murugesanthirumal
@murugesanthirumal
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant