2017-05-12 20 views
0

我无法将用户配置到联合域,如example.orgMicrosoft Graph API联合用户图表API提供

的网址,我发送POST的是:

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

JSON有效载荷是:

{ 
    "accountEnabled": true, 
    "city": "Seattle", 
    "country": "United States", 
    "department": "Sales & Marketing", 
    "displayName": "Melissa Darrow", 
    "givenName": "Melissa", 
    "jobTitle": "Marketing Director", 
    "mailNickname": "MelissaD", 
    "passwordPolicies": "DisablePasswordExpiration", 
    "passwordProfile": { 
    "password": "Test1234", 
    "forceChangePasswordNextSignIn": false 
    }, 
    "officeLocation": "131/1105", 
    "postalCode": "98052", 
    "preferredLanguage": "en-US", 
    "state": "WA", 
    "streetAddress": "9256 Towne Center Dr., Suite 400", 
    "surname": "Darrow", 
    "mobilePhone": "+1 206 555 0110", 
    "usageLocation": "US", 
    "immutableID": "melissab", 
    "userPrincipalName": "[email protected]" 
} 

我收到的是:

{ 
    "error": { 
     "code": "Request_BadRequest", 
     "message": "One or more properties contains invalid values.", 
     "innerError": { 
      "request-id": "9e8af7a6-fba2-4a66-8421-19dbfd2c36f1", 
      "date": "2017-05-12T12:13:22" 
     } 
    } 
} 

请注意immutableId可以发现在有效载荷中。

是否有可能为这些用户提供给定的REST框架?

回答

0

这是预期的行为。 Graph API不处理用户同步部分。用户可以使用Microsoft Azure Active Directory同步工具进行同步。

1

immutableID必须Base64编码(byte[]

String immutableId = new String(Base64.encodeBase64("someText".getBytes())); 
相关问题