Create user with sdk from AD in Dynamics CRM '13 - dynamics-crm

I am attempting to create a simple application for creating users in our on-prem Dynamics 2013 CRM installation. Right now, we create a user in AD then go to CRM and import the user by entering the AD username and domain in the CRM username field. We then manually enter the additional user properties. Currently, I have my app creating the AD users but, being new to CRM, I am stumbling about figuring out how to utilize the sdk to add my users in CRM. Also, I wonder if there is a better way to go about this.
Any help or guidance would be greatly appreciated.

Try starting with this from the online MSDN reference:
Sample: Create an on-premises user

Related

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

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.

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.

Adding Custom Attributes to an Office 365 User Mailbox alternative of PowerShell

Adding,Updating Custom Attributes to Office 365 User Mailbox.I know this can be done through PowerShell but is there any API reference or tool is doing this job for bulk users? I am new to this stuff. Any help would be appreciated.
Thanks
If your Identity approach is (Synchronized IDs), your Active Directory onprem is the source of authority, custom attributes could be configured from the on prem application itself or ADSI edit (works but officially not supported by MS!).
https://learn.microsoft.com/en-us/azure/active-directory/connect/active-directory-aadconnect-get-started-custom
Azure AD connect is the software you need to install, which controls the attribute flow from AD on prem to Azure AD, You can extend the schema in Azure AD with custom attributes added by your organization or other attributes in Active Directory. To use this feature, select Directory Extension attribute sync on the Optional Features page

Unable to add hotmail/outlook user in Visual Studio Team Services

I am trying to add user having Hotmail account but team foundation showing following error.
Can anybody please tell me that how can I add another user in VSTS?
No identities found.
Depends on how your account was set up. If it's Microsoft Account based (LiveID/Outlook.com/Hotmail), then you need to navigate to the account level users hub first.
https://{{account}}.visualstudio.com/_admin/_users
If your account is Azure Active Directory backed, then you need to import these users into Azure Active Directory first, then add them at the account level before being able to add them to a security group.

GetMaxPrivilegeDepthForUser Error when using the CRM Dynamics API

I am trying to integrate CRM Dynamics with Adobe Campaign, but I am getting an error.
Can anyone help me understand the meaning of this error:
'SecLib::GetMaxPrivilegeDepthForUser failed. Returned hr= -2147209463, User: a37d4ef0-7684-e511-8129-c4346bacefdc'
Give the service account user that you're using to authenticate with CRM's System Administrator role and make sure that user is also assigned to the most top-level business unit; if it doesn't work after that I would try creating a new administrator account from scratch.
Our team was using the wrong company id or better to say organisation id for the CRM account. Using the correct value fixed our problem.

Resources