Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Creating B2B account & integrating the customapps

Sekhar
Regular Contributor
Regular Contributor

Hi Team,

We have a new user story

Custom apps data stores in payload, having application ID, email & minimum attributes data. 

Integrate the custom apps into saviynt & pull the data/users.

We need to check the email has existed in Azure or not.

If email does not exist in azure AD, need to send an email invitation to enduser & create account in azure

If email has existed in azure AD no need to send an invite to enduser.

 

Could you please anyone suggest the related Graph API to validate the email in Azure, sending the email invitation to enduser & create an account in azure.

 

Thanks,

Sekhar

 

5 REPLIES 5

rushikeshvartak
All-Star
All-Star

 

{
  "invitedUserEmailAddress": "{email}",
  "inviteRedirectUrl": "https://yourapplication.com",
  "sendInvitationMessage": true
}

 

 

{
  "accountEnabled": true,
  "displayName": "John Doe",
  "mailNickname": "johndoe",
  "userPrincipalName": "johndoe@yourdomain.com",
  "passwordProfile": {
    "forceChangePasswordNextSignIn": true,
    "password": "Password123!"
  }
}

 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Thanks @rushikeshvartak for the quick response & informed me valuable information.

one change in the case.

we need to send an invitation to enduser, if user existed or not in both cases but invitation URL will vary based on the case. 

Ex:

User existed URL: ABC.com

User do not existed URL: MNO.com

Can you please suggest API for this case.

 

Thanks

Sekhar

{
  "invitedUserEmailAddress": "{email}",
  "inviteRedirectUrl": "{redirectUrl}",
  "sendInvitationMessage": true
}

 

email = "user@example.com"  # The email to check
exists = check_user_exists(email)  # Implement the GET /users/{email} API call

if exists:
    redirect_url = "https://ABC.com"  # URL for existing users
else:
    redirect_url = "https://MNO.com"  # URL for non-existing users

# Now send the invitation
send_invitation(email, redirect_url)  # Implement the POST /invitations API call

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hi @rushikeshvartak 

I need entire all steps in Single Json with multiple calls. Could you please share Json templates

1. Check if Email Exists in Azure AD

2. Send an Invitation to the End-User 

3. Create an Account in Azure AD (If Required)

While create account task is provisioning, should check email existed or not, if existed send an invite to email & attached the link as ABC.COM else send an invite to email & attached the link as MNO.COM & create an account

 

Thanks,

Sekhar

Refer https://docs.saviyntcloud.com/bundle/Dev-Handbook-REST-v24x/page/Content/Developers-Handbook.htm


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.