# Redirection from rule and Authz Role evaluation

**URL:** <https://community.auth0.com/t/redirection-from-rule-and-authz-role-evaluation/49130>\
**Category:** Get Help\
**Tags:** api-authorization, rules\
**Created:** [September 2, 2020, 11:21pm UTC](https://community.auth0.com/t/redirection-from-rule-and-authz-role-evaluation/49130 "2020-09-02T23:21:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ewright](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ewright/32/20529_2.png) [@ewright](https://community.auth0.com/u/ewright)\
**Post date:** [September 2, 2020, 11:21pm UTC](https://community.auth0.com/t/redirection-from-rule-and-authz-role-evaluation/49130/1 "2020-09-02T23:21:26Z")

</div>

Documentation [says](https://auth0.com/docs/best-practices/rules-best-practices/rules-execution-best-practices#redirection) that a rule may redirect to an external system and then redirect back to continue with the pipeline. A typical scenario is to add information to their profile.

Problem: I find that authz-core roles which are assigned to the user by the external system during the redirection flow don’t take effect in the current pipeline. In other words, the permissions block in the resultant access token doesn’t reflect the role assignments made during the pipeline. Subsequent pipelines are fine.

Is there a way to dynamically assign a role in the current pipeline? One scenario is to populate the initial roles for a new user account.

Thanks!

---

<div class="post-metadata">

**Author:** ![ewright](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ewright/32/20529_2.png) [@ewright](https://community.auth0.com/u/ewright)\
**Post date:** [September 4, 2020, 8:55pm UTC](https://community.auth0.com/t/redirection-from-rule-and-authz-role-evaluation/49130/2 "2020-09-04T20:55:01Z")

</div>

Upon further testing, seems the issue was due to a race condition on my end. Happy to say that the technique that I mentioned does work as expected.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [September 19, 2020, 8:55pm UTC](https://community.auth0.com/t/redirection-from-rule-and-authz-role-evaluation/49130/3 "2020-09-19T20:55:09Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
