0

I would like to create a custom signup policy that will check if a user exists and if it does, it will update a claim on the users object. If the user does not exist I would like it to create the user as normal.

As for right now, if a user attempts to signup using an email that already exists for a user I get an error stating "A user with the specified ID already exists. Please choose a different one."

Andrew Wiebe
  • 111
  • 13
  • Hi, have you tried using MS Graph for this, like here: https://stackoverflow.com/questions/52288877/azure-b2c-check-user-exist-or-not – James_Hamil-MSFT Jul 20 '22 at 20:42

1 Answers1

0

if I'm understanding your question correctly you can use the Graph to do this as referenced here.

Using this line:

https://graph.windows.net/myorganization/users?$filter=signInNames/any(x:x/value eq 'someone')&api-version=1.6

It will return an array. Either with the name or empty if it does not exist.

James_Hamil-MSFT
  • 171
  • 1
  • 1
  • 8