title: Angular HTTP Interceptor how to chain an observable
body: <p>I am using the Azure AD adal library to do authentication. There is a call to aquire a token that returns an observable. How can this observable be added into the intercept? In the below example, how can I get the request that is set inside the subscribe to be returned as the Observable?</p>
  
  <pre><code>  intercept(request: HttpRequest&lt;any&gt;, next: HttpHandler): Observable&lt;HttpEvent&lt;any&gt;&gt; {
      this.authAzureService.getAccessToken()
      .subscribe(token =&gt; {
        // I need this to be returned
        request = this.getRequestWithHeaders(request, token);
      });
  
      // This returns the request before the access token is added
      return next.handle(request);
    }
  </code></pre>