Enable risk assessment with the management API issue

I need to enable the risk assessment feature via code and followed the instructions in this document: Enable risk assessment with the management API - Auth0 Community.

I’ve tested it, and while my script does enable the feature in the Admin panel it doesn’t seem to activate properly.

Interestingly, if I click “Save” on the button below the feature in the Admin panel, it then becomes fully enabled. Has anyone else encountered this problem?

Yes, we encountered this problem as well. We solved it by making a PUT call to /api/v2/guardian/policies every time after the PATCH call, even if we aren’t changing any of the guardian settings. This seems to trigger Auth0 to refresh the risk assessment settings.