Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 1.22 KB

File metadata and controls

25 lines (19 loc) · 1.22 KB

graph-api-spring-boot-starter

Spring Boot starter for graph-api-authentication library

Demo can be found here

Usage

  1. Add any Spring Boot starter dependency (provides spring-boot & spring-boot-autoconfigure)
  2. Add Microsoft Graph Java SDK dependency
  3. Specify following properties under graph-api:
  • clientId - application (client) ID
  • clientSecret - application secret
  • tenant - directory (tenant) ID
  • scopes - list of scopes. Optional. https://graph.microsoft.com/.default used by default
  • nationalCloud - national cloud using for authentication. Optional. https://login.microsoftonline.com used by default

Additionally for delegate permissions should be specified:

  • user - userPrincipalName
  • password - user password
  • onlyDelegate - true, if application authentication bean is excess. Optional
  1. Autowire IGraphServiceClient bean, distinguished by name:
  • applicationGraphClient - provides application permissions
  • delegateGraphClient - provides delegate permissions