我试图做一个POST请求Azure的AD GraphAPI建立在我的广告B2C租户用户,但我发现了以下错误错误调用图形API:Request_DataContractVersionMissing
"Error Calling the Graph API:
{
"odata.error": {"code": "Request_DataContractVersionMissing",
"message": {"lang": "en",
"value": "The specified api-version is invalid. The value must exactly match a supported version"}
}
我做发送版本,并基于docs支持。
1.6版
本节列出了图形API 1.6版本的变化。
图形API 1.6版本引入了以下功能更改:
为Azure的Active Directory的B2C本地帐户的用户增加的支持。这涉及用户实体上的新属性和新的复杂类型 SignInName以支持本地帐户登录到Azure Active Directory B2C租户。有关Azure Active Directory B2C, 的更多信息,请参阅Azure Active Directory B2C文档。
[编辑] 提交JSON
{"accountEnabled":true,"signInNames":[{"type":"userName","value":"ausername"}],"creationType":"LocalAccount","displayName":"A display name","passwordProfile":{"password":"a password","forceChangePasswordNextLogin":true},"passwordPolicies":"policies","country":"MX","givenName":"Fstname","surename":"Lstname","department":"Dpt","jobTitle":"Title","mail":"[email protected]","otherMails":[],"preferredLanguage":"es-MX"}
为什么我得到错误的任何线索?
你能分享完整的JSON提交吗? (明显改变密码等) – spottedmahn
@spottedmahn我加了有效载荷到问题 – pollirrata
我试着提交你的json,我得到了'为资源'User''的属性'passwordPolicies'指定了无效的值.' – spottedmahn