cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ajithnair621
Helper II
Helper II

Custom roles not working for Model Driven App

I have created a Model Driven app in my SANDBOX environment. A new custom role which has access to 2 entity and 1 Business process flow was created. When I assign the app to another user with custom role, below message is displayed on Browser.

 

 

We are experiencing some errors while trying to load the application
Application failed to load
Technical Details
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, InvocationContext invocationContext, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext, Dictionary`2 optionalParameters) (unknown)
at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.Execute(OrganizationRequest request) (unknown)
at Microsoft.Crm.Extensibility.OData.CrmODataMetadataServiceDataProvider.RetrieveMetadataForEntityType(CrmODataExecutionContext context, Type crmType, EntityQueryExpression entityQuery, String entityId, String crmPropertyName, Boolean retrieveAllSettings) (unknown)
at Microsoft.Crm.Extensibility.OData.CrmODataMetadataServiceDataProvider.RetrieveEdmEntityCollection(CrmODataExecutionContext context, String entitySetName, String castedEntityName, ODataQueryOptions queryOptions) (unknown)
at Microsoft.Crm.Extensibility.OData.EntityController.<>c__DisplayClass35_0.<GetEntitySetInternal>b__0() (unknown)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties) (unknown)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action) (unknown)
at Microsoft.Crm.Extensibility.OData.EntityController.GetEntitySetInternal(String entitySetName, String castedEntityName, CrmODataExecutionContext context, CrmEdmEntityObjectCollection crmEdmEntityObjectCollection, ODataQueryOptions queryOptions) (unknown)
at Microsoft.Crm.Extensibility.OData.EntityController.GetEntitySetImplementation(String entitySetName) (unknown)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties) (unknown)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func) (unknown)
at lambda_method(Closure , Object , Object[] ) (unknown)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters) (unknown)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken) (unknown)
at anonymous (XXXXX/---%20End%20of%20stack%20trace%20from%20previous%20location%20where%20exception%20was%20thrown%20---)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() (unknown)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) (unknown)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext() (unknown)
at anonymous (XXXXX/---%20End%20of%20stack%20trace%20from%20previous%20location%20where%20exception%20was%20thrown%20---)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() (unknown)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) (unknown)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext() (unknown)
at anonymous (XXXXX/---%20End%20of%20stack%20trace%20from%20previous%20location%20where%20exception%20was%20thrown...)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() (unknown)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) (unknown)
at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext() (unknown)
1 ACCEPTED SOLUTION

Accepted Solutions
HSheild
Super User
Super User

Hi @Ajithnair621 ,

 

Have you checked that your custom Security Role has the minimum privileges required to run an app? When you create a new Security Role you need to give it a set of minimum privileges and it is best to create your new Security Role by copying an existing role.

 

This article explains it all.

https://docs.microsoft.com/en-us/power-platform/admin/create-edit-security-role#minimum-privileges-f...

 

-----
 
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".

View solution in original post

4 REPLIES 4
HSheild
Super User
Super User

Hi @Ajithnair621 ,

 

Have you checked that your custom Security Role has the minimum privileges required to run an app? When you create a new Security Role you need to give it a set of minimum privileges and it is best to create your new Security Role by copying an existing role.

 

This article explains it all.

https://docs.microsoft.com/en-us/power-platform/admin/create-edit-security-role#minimum-privileges-f...

 

-----
 
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".

View solution in original post

EricRegnier
Super User
Super User

To add to what @HSheild mentioned, following this tip https://crmtipoftheday.com/1297/base-your-base-role-on-the-cds-user-role/, I always base new custom roles to "Common Data Service User".

Cheers

Ajithnair621
Helper II
Helper II

Thanks @EricRegnier @HSheild .

 

 

It worked with CDS role

Glad it helped!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,806)