Dynamics 365 users created using the API are automatically assigned the Salesperson security role - dynamics-crm

When creating users in Dynamics 365 using the Microsoft CRM SDK, the salesperson security role is automatically assigned. We believe this behavior started recently.
It does not happen when creating users in Dynamics 365 using the UI.
The behavior is documented here for imported user.
The security role can also be added automatically based on assigned license. It is possible to opt out of this. One of our customers had Microsoft do this for their Dynamics environment, but the salesperson role is still added automatically.
This does not happen when creating users in on-premises CRM using the same code. There must be something on the Microsoft Dynamics 365 server side adding this security role.
Is there a way to avoid the automatic security role assignment?
We have a workaround by adding the user to the AAD security group of the Dynamics environment and waiting until the synchronization from AAD to Dynamics 365 creates the user before we add access and update personalia/settings using the API.

Related

Edit/Create access in Dynamics CRM for non licensed users

We have a scenario where we do not have enough licenses to provide to the users for Dynamics CRM Online. But we need these users to be able to edit/create rows in Appointments and Task tables. We have a license with Admin access. Can this license be shared or used in such a way that users can edit these tables through any other interface say using Power Apps or so? Is there any way to enable them to edit the tables?
What you can do is, get the per-user-per-app license for users so they can use Canvas app and get authenticated using AD SSO.
You can use the Admin service account to do data interactions into Dynamics CRM using MS Flow/Power Automate. Essentially CDS connector will use the licensed CRM admin account in the backend. Honestly I never tried this.
Another user also used HTTP request to use LogicApps to POST the data without license. Reference
PowerApps portals is another option.

Which security role in Dynamics CRM can disable users from modifying access teams?

I am customizing Dynamics CRM, and I am modifying access teams through coding. But I don't want users to be able to add access teams from screen. I cannot find the permission for that; can someone tell me where is it in the security role?
You have to identify the security role for users to limit the permission and remove the share privilege on that security role for that Access teams enabled entity. Read more
You can control who can add members to the Access Team subgrid. Only users with share privilege for the entity on which the access team exists can add or remove members from the Access Team subgrid. This makes sense—by adding people to the Access Team, you are in effect sharing the record with the people on the team.
You need a developer do that because it should modify the ribbon command in the systemuser entity.

How to get roles assigned for an user in Office 365 environment from Powerapps

We are trying to change Button Visibility Based on User Role. Added Custom Security Role, Assigned roles to Users from Dynamics 365 environment .
Custom Security roles
Assigned These roles to Users via Manage Roles option.
Manage User Roles
How can we get Role assigned for CurrentUser in Powerapps Environment? Only 3 attributes(Email,fullName,Image) are available for User() object. Tried using Dynamics 365 Users, Security roles etc into Datasource. Also tried by adding Users entity into Datasource.
Dynamics 365 security roles, users in to datasource
In a classic Dynamics CRM web UI or Model driven PowerApp, we have a choice to write client side form scripting to pull current user’s security roles and manipulate the client controls. We will be using web api or odata & utilize the systemuserrolescollection or SystemUserRolesSet dataset to pull the needed data. Read more
But in Canvas apps, even today we are unable to find this System user roles table in Dynamics 365 connectors. So we have to wait till this is exposed.
Or you can have a SQL replication (maybe Data export service) or custom connector which consume the D365 web api to pull this data.

DocuSign Dynamics integration - can't enable entities

I use Microsoft Dynamics CRM 365 and the DocuSign Integration for Dynamics 365 version 5.
My problem is that I can't enable any entities in the DocuSign Admin page in Dynamics.
When I save and refresh the page the previous chosen entities are not selected.
Thanks for help
I compared an other Dynamics demo org and figured out the reason for the issue.
Found the required info in the plugin trace logs.
My Dynamics org was created with the base language german.
The DocuSign integration needs checks if the user has a role with name "system administrator" and in my case the name of system admin role is in german.
And the langue package english should be installed on your Dynamics org.
After that I could enable the entities on the DocuSig Admin page.

How do you register your application to use the Office 365 Outlook REST API?

The documentation isn't clear on how to register your application to access the Office 365 outlook REST API. The documentation seems to say to go to the Microsoft Application Registration Portal, but logging in with 3 different accounts fails.
In order to use the Application Registration Portal, you need either an Office 365 work or school account, or a Microsoft account. If you don't have either of these, you have a number of options:
While you can use any Microsoft account to register applications, in order to access mail/calendar/contacts you need an upgraded Outlook.com account with the REST APIs enabled. To get an upgraded Outlook.com account, you could click here for solutions
obtain an Office 365 subscription ,also refer to above link for details.
If you register App in Microsoft Application Registration Portal, the app only support V2 authentication endpoints.
Another choice is to register your app with Azure AD ,so your application could use the OAuth2 Client Credentials Grant Flow, or need to access other Office 365 workloads besides Outlook (such as OneDrive for Business or SharePoint).
This article includes detail steps about manually register your app with Azure AD so it can access Office 365 APIs .

Resources