1
データタイプがstringCollection
のcustom attributeを定義し、Azure AD Graph APIを使用して更新できますか?私の実験は失敗している:指定されたコンテンツの種類とエンコーディングのためADグラフAPIを使用したB2Cカスタム属性文字列コレクションの更新
リクエストボディは、予期しない文字が含まれている/コンテンツ
は、カスタム属性の定義
<ClaimType Id="extension_array_test">
<DisplayName>Array Test</DisplayName>
<DataType>stringCollection</DataType>
<UserHelpText>Array Test in Token</UserHelpText>
</ClaimType>
{
"extension_[my-guid]_array_test": ["value 1", "value 2"]
}
Error Calling the Graph API:
{
"odata.error": {
"code": "Request_BadRequest",
"message": {
"lang": "en",
"value": "The request body contains unexpected characters/content for the specified content type and encoding."
}
}
}
おかげnyoung:あなたはこのようにエスケープJSONとしてあなたのデータを格納することができ、代替として
。そのドキュメントは古くなっており、boolとintもサポートしています。この[PR](https://github.com/MicrosoftDocs/azure-docs/pull/3775)を参照してください。 – spottedmahn
B2Cは 'stringCollections'をサポートします。[this code](https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack/blob/3b4898fec3bf0014b320beffa6eb52ad68eb6111/LocalAccounts/TrustFrameworkBase.xml#L185)を参照してください。 – spottedmahn
B2Cは、クレームと標準のAAD属性( 'otherMails'など)の' stringCollections 'をサポートしていますが、あなたが指摘しているように、拡張属性のデータ型はstring、bool、intです。 – nyoung