Updated for namespace handling of the NotAuthorizedException.