Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Unanswered

javascript error in model-driven app for non admin users

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

 

I have a couple of web resources in my model-driven app. When I share the app with users having specific roles, they get the following error. If I provide access to the "system admin", they can access the application. However, providing system admin access to all users is not a good idea. How can I get rid of this error without providing system admin access?

 

hafizsultan242_0-1693292720048.png

 

@saudali_25  , @Lucas001 , @Mglat  , @ragavanrajan , @Fubar any suggestions please..

 

Kind Regards,

Hafiz

Categories:
  • Fubar Profile Picture
    7,966 Super User 2025 Season 1 on at
    Re: javascript error in model-driven app for non admin users

    Have you created Security Roles for your users and have you assigned those roles to the users directly or to a Team they are a member of?

  • Saud Ali Profile Picture
    812 Super User 2024 Season 1 on at
    Re: javascript error in model-driven app for non admin users

    Hi @Anonymous ,

     

    Are you using any condition in your script that validates security role during execution? 

     

    Thanks,

    Saud

     

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • ragavanrajan Profile Picture
    7,036 Most Valuable Professional on at
    Re: javascript error in model-driven app for non admin users

    Hey @Anonymous 

     

    Did you try "web files" rather than web resources? Is there any specific reason for your web resource? Usually the following works 

    1.  Create a web file 

    2. Make sure to set the parent page to "Home"

    3. Add appropriate web page access control rule which is linked to the web roles 

     

    This method will work. 

     

    Alternatively, try creating Dataverse security roles - perhaps delegated roles with custom privileges to access web resources. ( I need to check this to confirm) 

     

    Try the web file method and let us know.

     

    Hope it helps.
    ------------

    If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 69 Super User 2025 Season 1

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 49 Most Valuable Professional

#3
Jon Unzueta Profile Picture

Jon Unzueta 43