I am combining 3 rules:
1:Assign a default role to a new user on first login (How do I add a default role to a new user on first login?)
2: Add New Contact to Hubspot for Marketing (as template given in Rules)
If I apply all 3 rules - then on signup I get:
Access Denied and Error Description :Cannot create property ‘app_metadata’ on string ‘’
If I disable rule 2, then I can signup/login but the rule 3 role is not assigned to the token that is sent to my web app (so I can’t provide role based experiences) - if i logout and log back in in this scenario then rule 3 is triggered and I can provide rule based experiences.
Any idea what’s going wrong?
Note, it does create the user when all 3 are enabled. If after an error, I disable rule 2, log in, then it works. Then if i log back out and re enable rule 2 and log back in, it works fine adding the appropriate data to app_metadata.
Is there an issue creating app_metadata on sign up but not log in?
Also, why would rule 1 and 3 not work together on sign up, but it does on re log in?
Further testing - on signup, rules don’t seem to be able to read
Further further testing - I believe rule 1 is not playing well with the other rules. Does it not resolve properly within a rule? Does the management function perhaps take not wait for resolving and thus the rule is not performing
callback before ending the rule?
Does rule 3 not work on signup because it has already sent a token? How would this be resolved?