Reputation: 221
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."
Upvotes: 0
Views: 300
Reputation: 191
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.
Upvotes: 0