fix: #3611671 Authentication provider should only apply when agent scope is present

Closes #3611671

Merge request reports

Loading