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
Copy file name to clipboardExpand all lines: README.md
+26-27Lines changed: 26 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,23 @@
1
1
# Preview Microsoft Graph SDK for Java
2
+
2
3
This client library is currently in private preview status. This means that:
3
-
- The API surface may change significantly
4
-
- Non-blocking issues *may* be triaged at a slower pace
5
-
- You may submit feedback through issues or PRs. You will have a better chance of your changes being implemented if they are submitted before public preview release
6
-
- We do not define an SLA or support strategy for this library
4
+
- The API surface may change significantly.
5
+
- Non-blocking issues *may* be triaged at a slower pace.
6
+
- You may submit feedback through issues or PRs. You will have a better chance of your changes being implemented if they are submitted before public preview release.
7
+
- We do not define an SLA or support strategy for this library.
7
8
8
9
We welcome your feedback as we drive the quality of this to general availability.
9
10
10
-
# Get started with the Microsoft Graph SDK for Java
11
-
12
-
Integrate the [Microsoft Graph API](https://graph.microsoft.io/en-us/getting-started) into your Java application!
11
+
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!
13
12
14
13
## 1. Installation
14
+
15
15
### 1.1 Install via Gradle
16
-
*This package will not be available via Gradle until it hits public preview. You will need to download the source and reference the package locally.*
17
16
18
-
Add the JCenter repository and a compile dependency for `microsoft-graph` to your project's `build.gradle`
17
+
> [!NOTE]
18
+
> This package will not be available via Gradle until it is in public preview. You need to download the source and reference the package locally.
19
+
20
+
Add the JCenter repository and a compile dependency for `microsoft-graph` to your project's `build.gradle`:
19
21
20
22
```gradle
21
23
repository {
@@ -29,28 +31,25 @@ dependency {
29
31
```
30
32
31
33
### 1.2 Enable ProGuard (Android)
32
-
The nature of the Graph API is such that the SDK needs quite a large set of classes to describe its functionality. You will 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 necessary 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).
34
+
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).
33
35
34
36
## 2. Getting started
35
37
36
38
### 2.1 Register your application
37
39
38
-
Register your application by following [these](https://developer.microsoft.com/en-us/graph/docs/concepts/auth_register_app_v2) steps.
40
+
Register your application by following the steps at [Register your app with the Azure AD v2.0 endpoint](https://developer.microsoft.com/en-us/graph/docs/concepts/auth_register_app_v2).
39
41
40
42
### 2.2 Create an IAuthenticationProvider object
41
43
42
-
An instance of the **GraphServiceClient** class handles building requests,
43
-
sending them to the Microsoft Graph API, and processing the responses. To create a
44
-
new instance of this class, you need to provide an instance of
45
-
`IAuthenticationProvider` which can authenticate requests to Microsoft Graph.
44
+
An instance of the **GraphServiceClient** class handles building requests, sending them to the Microsoft Graph API, and processing the responses. To create a new instance of this class, you need to provide an instance of `IAuthenticationProvider`, which can authenticate requests to Microsoft Graph.
46
45
47
-
For an example of authentication in a client application see the [MSGraph SDK Android MSA Auth for Android Adapter](https://github.com/microsoftgraph/msgraph-sdk-android-msa-auth-for-android-adapter).
46
+
For an example of authentication in a client application, see the [MSGraph SDK Android MSA Auth for Android Adapter](https://github.com/microsoftgraph/msgraph-sdk-android-msa-auth-for-android-adapter).
48
47
49
48
### 2.3 Get a GraphServiceClient object
50
49
51
-
TODO: the para below needs expansion or removal. Would need to mention the different flows (authorization code flow, implicit flow, client credential flow) and give pointers on where to get sample code. Dave Moten can provide link for client credentials flow.
50
+
<!--TODO: the following para needs expansion or removal. Would need to mention the different flows (authorization code flow, implicit flow, client credential flow) and give pointers on where to get sample code. Dave Moten can provide link for client credentials flow.-->
52
51
53
-
Once you have set the correct application ID and url, you must get a **GraphServiceClient** object to make requests against the service. The SDK will store the account information for you, but when a user logs on for the first time, it will invoke UI to get the user's account information.
52
+
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.
Once you have a GraphServiceClient that is authenticated you can begin making calls against the service. The requests against the service look like our [REST API](https://developer.microsoft.com/en-us/graph/docs/concepts/overview).
66
+
After you have a GraphServiceClient that is authenticated, you can begin making calls against the service. The requests against the service look like our [REST API](https://developer.microsoft.com/en-us/graph/docs/concepts/overview).
68
67
69
-
### Get the user's drive
68
+
### 3.1 Get the user's drive
70
69
71
70
To retrieve the user's drive:
72
71
@@ -89,14 +88,14 @@ For a general overview of how the SDK is designed, see [overview](https://github
@@ -105,15 +104,15 @@ For known issues, see [issues](https://github.com/MicrosoftGraph/msgraph-sdk-jav
105
104
106
105
## 6. Contributions
107
106
108
-
The Microsoft Graph SDK is open for contribution. Please read how to contribute to this project[here](https://github.com/microsoftgraph/msgraph-sdk-java/blob/master/CONTRIBUTING.md).
107
+
The Microsoft Graph SDK is open for contribution. To contribute to this project, see [Contributing](https://github.com/microsoftgraph/msgraph-sdk-java/blob/master/CONTRIBUTING.md).
109
108
110
-
## 7. Supported Java Versions
109
+
## 7. Supported Java versions
111
110
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.
112
111
113
112
## 8. License
114
113
115
114
Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the [MIT license](LICENSE).
0 commit comments