FAQ | This is a LIVE service | Changelog

Skip to content

Update function to receive entra event and get data for user from graph API

Description

Update the entra event handler function so that it can receive an MS Graph API subscription notification (which will be delivered via the ucam-faas event bridge), and check the password last updated state of the user it was notified for.

Further details

This will require reading the event message, and calling the already existing (from #2 (closed)) code to retrieve the last password changed time for the user in the event message.

We probably need to change the decorator to raw_event (see https://gitlab.developers.cam.ac.uk/uis/devops/iam/activate-account/infrastructure/-/merge_requests/225#note_1085427).

This issue is also responsible for hooking up the event grid topic to the event handler in the infrastructure (see https://gitlab.developers.cam.ac.uk/uis/devops/iam/activate-account/infrastructure/-/merge_requests/225#note_1085500).

Task list

Acceptance criteria

  • The user mentioned in the Graph API user update notification's password last changed time is printed to the stdout
  • Test that the Test User triggers this event if the password has changed (manual end-to-end test)

Links/references

Edited by Sebastiaan ten Pas