title: Azure authentication Symfony
body: <p>I've created a Symfony 4.2 app, and i want to add a Microsoft authentication in it, so after many research on the web I've found a library called <a href="https://github.com/hwi/HWIOAuthBundle" rel="nofollow noreferrer">HWIOAuthBundle</a> i've followed everystep but I still have issue</p>
  
  <p>If anyome can help me it can be very helpfull</p>
  
  <p>hwi_oauth.yaml file :</p>
  
  <pre><code>#/config/packages/hwi_oauth.yaml
  hwi_oauth:
  # list of names of the firewalls in which this bundle is active, this setting MUST be set
  firewall_names: [secured_area]
  
  # https://github.com/hwi/HWIOAuthBundle/blob/master/Resources/doc/2-configuring_resource_owners.md
  resource_owners:
      azure:
          type:                azure
          client_id:           '%env(AZURE_ID)%'
          client_secret:       '%env(AZURE_SECRET)%'
  
          options:
              resource: https://graph.windows.net
              application: common
  </code></pre>
  
  <p>Here it's my security file :</p>
  
  <pre><code>#/config/packages/security.yaml
  security:
  # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
  providers:
      in_memory: { memory: ~ }
  firewalls:
      dev:
          pattern: ^/(_(profiler|wdt)|css|images|js)/
          security: false
      secured_area:
          anonymous: true
          oauth:
              resource_owners:
                  azure: "/login/check-azure"
              login_path: /login
              use_forward: false
              failure_path: /login
  
              oauth_user_provider:
                  service: my.oauth_aware.user_provider.service
  
          # activate different ways to authenticate
  
          # http_basic: true
          # https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
  
          # form_login: true
          # https://symfony.com/doc/current/security/form_login_setup.html
  
  # Easy way to control access for large sections of your site
  # Note: Only the *first* access control that matches will be used
  access_control:
      - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
      # - { path: ^/admin, roles: ROLE_ADMIN }
      # - { path: ^/profile, roles: ROLE_USER }
  </code></pre>
  
  <p>My error when I run <code>php bin/console server:run</code> : 
  <code>The service "hwi_oauth.authentication.provider.oauth.secured_area" has a dependency on a non-existent ser
    vice "my.oauth_aware.user_provider.service".</code></p>
  
  <p>Thanks in advance</p>
  
  <p>Stoufiler</p>