在 office365 中调用创建用户时,一个或多个属性包含无效值

One or more properties contains invalid values When Call create user in office365

apihttps://graph.microsoft.com/v1.0/users总是return

One or more properties contains invalid values

POST https://graph.microsoft.com/v1.0/users

Header:

Authorization:Bearer xxxx
Content-Type:application/json

Body:

{
    "accountEnabled": true,
    "displayName": "lh lh",
    "mailNickname": "lhzc226",
    "userPrincipalName": "lhzc226@lhzc.cn",
    "passwordProfile": {
        "forceChangePasswordNextSignIn": true,
        "password": "@MvYE8177"
    }
}

return:

{
    "error": {
        "code": "Request_BadRequest",
        "message": "One or more properties contains invalid values.",
        "innerError": {
            "request-id": "e54a9d33-e9ec-4e9a-a867-2fc87d5ba807",
            "date": "2019-06-28T09:59:43"
        }
    }
}

还有其他接口可以调用。目前只有创建用户会报这个错。有谁知道这是为什么?

我找到关键点了。域lhzc.cn不是主域,设为主域,api不会报错