从B2C IEF策略中为其他属性调用MS Graph API [英] Calling MS Graph API for additional attribute from within B2C IEF Policy
问题描述
我试图通过查看自定义字段(即员工ID)以及是否已有该员工ID的记录来防止在Azure B2C中创建重复帐户,不允许用户创建新帐户.由于没有出现,您可以使用自定义字段作为输入,因此我正在考虑使用Graph API查看是否为给定的Employee ID返回了一条记录-如果有,那么它将停止注册过程,如果没有不能继续注册.
I am trying to prevent duplicate accounts from being created in Azure B2C by looking at a custom field (i.e. Employee ID) and if there is a record of that Employee ID already existing, not allowing the user to create a new account. Since it doesn't appear you can use custom fields as an Input, I was considering using the Graph API to see if a record is returned for a given Employee ID- if it does, then it would stop the registration process, if it doesn't the registration can continue.
是否可以直接调用Graph API并在策略中进行此记录计数比较.还是我需要一个单独的脚本/函数来使用给定的员工ID调用Graph API,然后返回要比较的记录数?
Is it possible to directly call the Graph API and do this record count comparison within a policy. Or would I need to have a separate script/function to call Graph API with the given employee ID and then return the number of records to compare?
推荐答案
在注册期间,请使用自定义策略将employeeId值存储在signInNames属性中.此属性具有唯一性约束.
During sign up, store the employeeId value in the signInNames attribute using a custom policy. This attribute has a uniqueness constraint.
这篇关于从B2C IEF策略中为其他属性调用MS Graph API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!