我正在尝试...@gmail.com通过 Graph API (C#)将带有电子邮件的用户添加到我的 B2C 目录。我得到这个作为回应:
userPrincipalName 属性的域部分无效。您必须在您的组织中使用经过验证的域名之一。
该系统需要允许任何电子邮件域的用户登录。用户需要登录网站,不能访问 Azure 门户。
有没有办法在不手动添加每个域的情况下完成此操作?
通过Graph API添加用户的代码:
var confidentialClientApplication = ConfidentialClientApplicationBuilder
.Create(clientId)
.WithTenantId(tenantId)
.WithClientSecret(clientSecret)
.Build();
var authProvider = new ClientCredentialProvider(confidentialClientApplication);
var graphClient = new GraphServiceClient(authProvider);
var user = new User
{
AccountEnabled = true,
DisplayName = emailAddress,
MailNickname = emailAddress.Split('@').FirstOrDefault(),
UserPrincipalName = emailAddress,
PasswordProfile = new PasswordProfile
{
ForceChangePasswordNextSignIn = true,
Password = tempPassword
}
};
Run Code Online (Sandbox Code Playgroud) 以前在 swift 中你可以这样做:
let animator = UIViewPropertyAnimator(duration: 0.25, curve: .easeIn) {
UIView.setAnimationRepeatCount(Float.infinity)
UIView.setAnimationRepeatAutoreverses(true)
let transform = CATransform3DIdentity
let rotate = CATransform3DRotate(transform, 45, 1, 1, 0)
self.ex.layer.transform = rotate
}
Run Code Online (Sandbox Code Playgroud)
UIView.setAnimationRepeatCount但是,现在和上有一条弃用消息UIView.setAnimationRepeatAutoreverses。有人知道他们被替换成什么了吗?我仍然可以使用UIViewPropertyAnimator,还是我必须去类似的地方CABasicAnimation?
消息是:
iOS 13.0 中已弃用“setAnimationRepeatCount”:改用基于块的动画 API
iOS 13.0 中已弃用“setAnimationRepeatAutoreverses”:改用基于块的动画 API