You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get started with the Microsoft Graph SDK for Java by integrating the [Microsoft Graph API](https://graph.microsoft.io/en-us/getting-started) into your Java application!
7
6
7
+
> **Note:** this SDK allows you to build applications using the [v1.0](https://docs.microsoft.com/en-us/graph/use-the-api#version) of Microsoft Graph. If you want to try the latest Microsoft Graph APIs under beta, use our [beta SDK](https://github.com/microsoftgraph/msgraph-beta-sdk-java) instead.
8
+
8
9
## 1. Installation
9
10
10
11
### 1.1 Install via Gradle
@@ -23,17 +24,19 @@ dependencies {
23
24
```
24
25
25
26
### 1.2 Install via Maven
27
+
26
28
Add the dependency in `dependencies` in pom.xml
27
29
28
30
```xml
29
31
<dependency>
30
-
<groupId>com.microsoft.graph</groupId>
31
-
<artifactId>microsoft-graph</artifactId>
32
-
<version>2.0.0</version>
32
+
<groupId>com.microsoft.graph</groupId>
33
+
<artifactId>microsoft-graph</artifactId>
34
+
<version>2.0.0</version>
33
35
</dependency>
34
36
```
35
37
36
38
### 1.3 Enable ProGuard (Android)
39
+
37
40
The nature of the Graph API is such that the SDK needs quite a large set of classes to describe its functionality. You need to ensure that [ProGuard](https://developer.android.com/studio/build/shrink-code.html) is enabled on your project. Otherwise, you will incur long build times for functionality that is not necessarily relevant to your particular application. If you are still hitting the 64K method limit, you can also enable [multidexing](https://developer.android.com/studio/build/multidex.html).
38
41
39
42
## 2. Getting started
@@ -49,6 +52,7 @@ An instance of the **GraphServiceClient** class handles building requests, sendi
49
52
For an example of authentication in a Java desktop client application, see the [Preview msgraph-sdk-java-auth](https://github.com/microsoftgraph/msgraph-sdk-android-msa-auth-for-android-adapter) and for an Android application see [Preview msgraph-sdk-android-auth](https://github.com/microsoftgraph/msgraph-sdk-android-auth).
50
53
51
54
### 2.3 Get a GraphServiceClient object
55
+
52
56
After you have set the correct application ID and URL, you must get a **GraphServiceClient** object to make requests against the service. The SDK stores the account information for you, but when a user signs in for the first time, it invokes the UI to get the user's account information.
53
57
54
58
```java
@@ -116,6 +120,7 @@ Thanks to everyone who has already devoted time to improving the library:
116
120
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind are welcome!
117
121
118
122
## 7. Supported Java versions
123
+
119
124
The Microsoft Graph SDK for Java library is supported at runtime for Java 7+ and [Android API revision 15](http://source.android.com/source/build-numbers.html) and greater.
0 commit comments