无法在Dynamics CRM 365在线中创建系统用户 [英] Unable to Create a systemuser in Dynamics CRM 365 online

查看:382
本文介绍了无法在Dynamics CRM 365在线中创建系统用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在联系记录的更新字段上,我想在动态crm 365中创建一个systemuser(user).但是我遇到类似"usersettings with Id = 5fe33120-607f-e811-a95c-000d3af29269不存在"的错误/p>

这是我尝试创建用户的以下代码

Entity getEntity = (Entity)context.InputParameters["Target"];
                string str = getEntity.Attributes["new_isaeon"].ToString();

                if (str != null && str == "True")
                {
                    // http://localhost:51625/api/Users
                    Entity sysuser = new Entity("systemuser");
                    sysuser.Attributes["fullname"] = "hsk";
                    sysuser.Attributes["internalemailaddress"] = "projectservice_9@crmdemo.dynamics.com";
                    sysuser.Attributes["domainname"] = "projectservice_9@crmdemo.dynamics.com";
                    Guid getGuid = new Guid("700F2217-786A-E811-A95A-000D3AF2793E");
                    sysuser.Attributes["businessunitid"] = new EntityReference("businessunit", getGuid);
                    sysuser.FormattedValues["accessmode"] = "Read-Write";
                    Guid getuserid = service.Create(sysuser);

                }

有人可以帮助我吗?

解决方案

在Dynamics 365 CRM在线中,系统用户记录从O365管理门户端开始的创建/启用流程. 了解详情

步骤如下:
1.必须在Active Directory&中创建安全组.映射到O365管理门户中的任何CRM Org
2.必须在该AD安全组中添加用户
3.来自SG的所有用户将被复制为CRM实例中的系统用户
4.在O365管理门户中,为用户分配CRM许可证(基本/专业版)后,系统用户记录将在CRM中启用
5.在CRM方面,我们将分配安全角色以完成用户的入职

由于上述CRM Online之外的手动步骤,我们无法直接使用SDK创建系统用户.可以使用PowerShell创建,例如在社区中回答.

On update field of contact record I want to create a systemuser(user) in dynamics crm 365 online.but I’m getting error like "usersettings With Id = 5fe33120-607f-e811-a95c-000d3af29269 Does Not Exist"

This is the below code I'm trying to create a user

Entity getEntity = (Entity)context.InputParameters["Target"];
                string str = getEntity.Attributes["new_isaeon"].ToString();

                if (str != null && str == "True")
                {
                    // http://localhost:51625/api/Users
                    Entity sysuser = new Entity("systemuser");
                    sysuser.Attributes["fullname"] = "hsk";
                    sysuser.Attributes["internalemailaddress"] = "projectservice_9@crmdemo.dynamics.com";
                    sysuser.Attributes["domainname"] = "projectservice_9@crmdemo.dynamics.com";
                    Guid getGuid = new Guid("700F2217-786A-E811-A95A-000D3AF2793E");
                    sysuser.Attributes["businessunitid"] = new EntityReference("businessunit", getGuid);
                    sysuser.FormattedValues["accessmode"] = "Read-Write";
                    Guid getuserid = service.Create(sysuser);

                }

can anyone help me on this thanks.

解决方案

In Dynamics 365 CRM online, system users record creation/enabling flow happens from O365 Admin portal end. Read more

Steps go like this:
1. Security group has to be created in Active directory & mapped in O365 Admin portal for any CRM Org
2. Users has to be added in that AD Security group
3. All the users from SG will be replicated as system users in CRM instance
4. In O365 Admin portal, on assigning CRM license (Basic/Pro) against the user - the system user record will be enabled in CRM
5. In CRM side, we will assign Security role to complete user on-boarding

We cannot create system user using SDK directly because of above manual steps outside CRM online. Can be created using PowerShell like answered in community.

这篇关于无法在Dynamics CRM 365在线中创建系统用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆