John Davidson

php - how to configure the azure app to send a notification when a user is deleted from the app

0 comments
Message:


Everyone is fine? I have an azure AD registered app that integrates into a php system using a single login with the SAML protocol.


everything works fine, but I need to set up a request so that when the user is deleted by the administrator it sends a request to my server so I can log the user out and remove it from my system.


what have I tried?



  • I tried to use provisioning but I didn't get the result I wanted, even setting the correct mapping.



  • I've wondered how I can do this with provisioning, trying to understand how to send when the user is deleted in azure to my system, but I don't understand how I can do this.




what do i really want?


When the app's adm deletes the user, it sends a request for a route configured on my server so that I can also delete the user from my server.



My Answer:
To achieve this, you can use Azure AD's provisioning feature along with webhooks to send a notification to your server when a user is deleted from the app. Here's a general outline of how you can set this up:

1. Configure provisioning in your Azure AD app:
- Go to the Azure portal and navigate to your Azure AD app's settings.
- Enable provisioning and configure the necessary settings such as the provisioning mode, mappings, and filters.
- Make sure to map the necessary attributes for user deletion events.

2. Set up a webhook on your server:
- Create a route on your server that can receive notifications from Azure AD.
- Generate a unique URL for this route and make sure it is secure and can handle incoming requests.

3. Configure the webhook in Azure AD:
- In the provisioning settings of your Azure AD app, set up a webhook to send notifications to the URL of your server's route.
- Configure the webhook to send notifications for user deletion events.

4. Handle the incoming requests on your server:
- Implement the necessary logic in your server's route to handle the incoming notifications from Azure AD.
- When a user deletion event is received, log the user out and remove them from your system.

By following these steps, you should be able to set up a notification system that sends a request to your server when a user is deleted from your Azure AD app. Make sure to test the setup thoroughly to ensure it works as expected.

Rate this post

4 of 5 based on 1579 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us