diff --git a/docs/public/README.md b/docs/public/README.md index d32a263..fc4afad 100644 --- a/docs/public/README.md +++ b/docs/public/README.md @@ -639,7 +639,8 @@ The control plane emits this event any time it onboards a new tenant. This event "tenantName": "tenant$RANDOM", "email": "tenant@example.com", "tier": "basic", - "tenantStatus": "In progress" + "tenantStatus": "In progress", + "tenantRegistrationId": "guid string" } } ``` diff --git a/resources/functions/tenant-registrations/index.py b/resources/functions/tenant-registrations/index.py index 74e960c..d7a1d30 100644 --- a/resources/functions/tenant-registrations/index.py +++ b/resources/functions/tenant-registrations/index.py @@ -46,6 +46,7 @@ def create_tenant_registration(): json_body = app.current_event.json_body tenant_registration_id = str(uuid.uuid4()) tenant_data = json_body.get("tenantData", {}) + tenant_data["tenantRegistrationId"] = tenant_registration_id tenant_registration_data = json_body.get("tenantRegistrationData", {}) # Create tenant registration @@ -76,7 +77,7 @@ def create_tenant_registration(): json.dumps( tenant_registration_data | tenant_data - | {"tenantId": tenant_id, "tenantRegistrationId": tenant_registration_id} + | {"tenantId": tenant_id} ), onboarding_detail_type, )