cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Dippa
Level: Powered On

Error message in PowerApps Data Integration - Bad request

Hi,

I'm attempting to make use of the SQL to CDS tremplate to move data from a SQL table into the Common data store. I can create the DI (Data Integration) app but get the error message below when it runs. To further clarify, the DI is able to retrieve the data from SQL, create the post request and sends it to CDS, CDS seems to reject the request.

 

For the Post request:

POST https://orge1e47dcf.crm6.dynamics.com/api/data/v9.0/cdm_workers {"cdm_middlename":"xxx","cdm_lastname":"xxxxxxxxx","cdm_emailaddress1":"test1","cdm_workernumber":"42825","ownerid@odata.bind":"/teams(0c3347fc-f4dd-e511-a967-006d3ae75f5a)"}

 

This is the error

Bad Request {"error":{"code":"0x80042f0a","message":"Principal team (Id=c3347fc-f4dd-e511-a967-006d3ae75f5a, type=9, teamType=0, privilegeCount=0, is missing prvReadcdm_worker privilege (Id=2b5c359a-6bf3-426f-9558-f7326760de18","innererror":{"message":"Principal team (Id=0c3747fc-f0dd-e813-a977-000d3ae03f5a, type=9, teamType=0, privilegeCount=0, is missing prvReadcdm_worker privilege (Id=2b53259a-63f3-4f3f-9558-f7326760de18","type":"System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=9999999999999]]","stacktrace":" at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.CreateInternal(Entity entity, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, Dictionary`2 optionalParameters)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.CreateOrganizationResponse(Entity entity)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.CreateEdmEntity(CrmODataExecutionContext context, String edmEntityName, EdmEntityObject entityObject, Boolean isUpsert)\r\n at Microsoft.Crm.Extensibility.OData.EntityController.PostEntitySetImplementation(String& entitySetName, EdmEntityObject entityObject)\r\n at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)\r\n at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"}}}

 

 

Thanks

 

J

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dippa
Level: Powered On

Re: Error message in PowerApps Data Integration - Bad request

Hi,

I managed to fix this last night., and thank you for your reply!

Even though I had PowerApps and Flow licenses asssinged they were not listed under 'customer engagement'.

So make sure in office 365 under licenses you have the correct PowerApp and Flow lic.

Thanks

J

View solution in original post

5 REPLIES 5
Community Support Team
Community Support Team

Re: Error message in PowerApps Data Integration - Bad request

Hi @Dippa,

Could you please share a bit more about the error message within your app?
Based on the error message that you mentioned, it seems to tell that your current sign in account does not have prvReadcdm_worker permission to CDS in your PowerApps.

Please check if you have assigned proper permission (e.g. System Administrator) to your current sign in account to access your CDS. Please take a try to assign a System Administrator Role to your current sign in user, then check if the issue is solved.

More details about configuring environment security, please check the following article:

https://docs.microsoft.com/en-us/powerapps/administrator/database-security

More details about Privileges required for customization in PowerApps environment, please check the following article:

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/customize/privileges-required-custo...

 

In addition, if the issue still exists, please consider take a try to re-create a new Data Integration project within your PowerApps, check if the issue still exists.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Dippa
Level: Powered On

Re: Error message in PowerApps Data Integration - Bad request

Hi,

I managed to fix this last night., and thank you for your reply!

Even though I had PowerApps and Flow licenses asssinged they were not listed under 'customer engagement'.

So make sure in office 365 under licenses you have the correct PowerApp and Flow lic.

Thanks

J

View solution in original post

Community Support Team
Community Support Team

Re: Error message in PowerApps Data Integration - Bad request

Hi @Dippa,

Have you solved your problem?

If you have solved your problem, please go head to click "Accept as Solution" to identify this thread has been solved for other users.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
josemg0g0
Level: Power Up

Re: Error message in PowerApps Data Integration - Bad request

I had the same problem, and licenses were correct.

 

The solution for me was to assign permissions to the team. By default PowerApp Integration Task uses root team to assign the ownership if you don't define mapping fields for that.

 

Other solution could be to create a mapping fields for ownership between source and destination and assign an owner.

 

Anonymous
Not applicable

Re: Error message in PowerApps Data Integration - Bad request

Hi @josemg0g0 

 

Could you provide detail step by step? im new in CDS and CRM, the problem is same, error privileges in entities with ownership type user and team

 

Thanks

Hamzah

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (7,335)