From our AzureAD there is no 'roles' property defined on the this.user.profile object and as such I was getting an error that indexOf was not defined when the role check was being performed.
I have added a guard against a null or missing roles list so that role checks fail if the user's profile has no roles.
From our AzureAD there is no 'roles' property defined on the this.user.profile object and as such I was getting an error that indexOf was not defined when the role check was being performed. I have added a guard against a null or missing roles list so that role checks fail if the user's profile has no roles.