George Doubinski
George Doubinski
Not the server log, toolkit log that you can initialise when creating an org service instance `$service = new OrganizationService( $serviceSettings, $cache, $logger )`
@tanberg I wonder if you have the right permissions on CRM, e.g. reading metadata... What is the role of the user you're using to connect?
@tanberg you're using display name `Lead`, it should be logical name, i.e. `lead`. Try `$lead = $service->entity( 'lead', $LeadId);` (thanks @wizardist !)
@tanberg I'm out of ideas. We need the logs or you need to step through in debug to see what's coming back in the metadata and why attributes are not...
@tanberg looks like it's a permission issue. Can you double-check what role does your user account have in Dynamics 365?
😩😩😩
@dantedantas have you run composer? ``` $ composer require alexacrm/dynamics-webapi-toolkit:dev-master ```
That's probably insufficient permissions. If you attach a logger and set level to Debug then you'll be able to track the issue better. Check the roles assigned to the app...
@dantedantas that has nothing to do with delegated permissions. What roles do you have assigned to the app user in Dataverse?
@dantedantas Dataverse documentation has all you need: https://docs.microsoft.com/power-platform/admin/database-security#assign-security-roles-to-users-in-an-environment-that-has-a-dataverse-database