Run post-deployment steps: SPA redirect URI. Args: app_object_id (str): The Entra app registration object ID (for Graph API). fqdn (str): The deployed app FQDN.
(
*,
app_object_id: str,
fqdn: str,
)
| 872 | |
| 873 | |
| 874 | def post_deploy( |
| 875 | *, |
| 876 | app_object_id: str, |
| 877 | fqdn: str, |
| 878 | ) -> None: |
| 879 | """ |
| 880 | Run post-deployment steps: SPA redirect URI. |
| 881 | |
| 882 | Args: |
| 883 | app_object_id (str): The Entra app registration object ID (for Graph API). |
| 884 | fqdn (str): The deployed app FQDN. |
| 885 | """ |
| 886 | # Set SPA redirect URI via Graph REST API (more portable than --spa-redirect-uris flag) |
| 887 | logger.info("Setting SPA redirect URI: https://%s", fqdn) |
| 888 | spa_body = {"spa": {"redirectUris": [f"https://{fqdn}"]}} |
| 889 | run_az( |
| 890 | args=[ |
| 891 | "rest", |
| 892 | "--method", |
| 893 | "PATCH", |
| 894 | "--url", |
| 895 | f"https://graph.microsoft.com/v1.0/applications/{app_object_id}", |
| 896 | "--body", |
| 897 | json.dumps(spa_body), |
| 898 | ] |
| 899 | ) |
| 900 | |
| 901 | |
| 902 | def create_managed_identity_and_grant_roles( |