我正在尝试再次SCIM sdk 1.1
在我的Spring Boot
项目中使用facebook workplace api
. 到目前为止UserResource
,我创建了一个填充了虚拟数据的模型来测试它。
然而,我在创建实体时不断收到异常,当我已经设置了电子邮件时抱怨电子邮件。
这是我的代码
// User endpoint for core schema
final SCIMEndpoint<UserResource> endpoint = scimService.getUserEndpoint();
UserResource userResource = endpoint.newResource();
userResource.setActive(true);
userResource.setDisplayName("test user");
userResource.setName(new Name("Test User", "User", "", "", "", ""));
userResource.setUserType("Employee");
userResource.setPhoneNumbers(Lists.newArrayList(new Entry<String>("bla bla bla", "work", true)));
userResource.setTitle("Backend developer");
userResource.setEmails(Lists.newArrayList(new Entry<String>("test@test.com","work", true)));
UserResource createdResource = endpoint.create(userResource, "");
这是我得到的例外:
com.unboundid.scim.sdk.SCIMException: Missing Email field: You must provide an email