@microsoft/msgraph-sdk-users 1.0.0-preview.55 → 1.0.0-preview.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +189 -4
  2. package/package.json +2 -2
  3. package/tsconfig.tsbuildinfo +1 -1
  4. package/users/index.d.ts +4 -4
  5. package/users/item/calendar/calendarView/item/exceptionOccurrences/index.d.ts +3 -3
  6. package/users/item/calendar/calendarView/item/exceptionOccurrences/item/index.d.ts +3 -3
  7. package/users/item/calendar/calendarView/item/exceptionOccurrences/item/instances/index.d.ts +3 -3
  8. package/users/item/calendar/calendarView/item/exceptionOccurrences/item/instances/item/index.d.ts +3 -3
  9. package/users/item/calendar/calendarView/item/instances/index.d.ts +3 -3
  10. package/users/item/calendar/calendarView/item/instances/item/exceptionOccurrences/index.d.ts +3 -3
  11. package/users/item/calendar/calendarView/item/instances/item/exceptionOccurrences/item/index.d.ts +3 -3
  12. package/users/item/calendar/calendarView/item/instances/item/index.d.ts +3 -3
  13. package/users/item/calendar/events/item/exceptionOccurrences/index.d.ts +3 -3
  14. package/users/item/calendar/events/item/exceptionOccurrences/item/index.d.ts +3 -3
  15. package/users/item/calendar/events/item/exceptionOccurrences/item/instances/index.d.ts +3 -3
  16. package/users/item/calendar/events/item/exceptionOccurrences/item/instances/item/index.d.ts +3 -3
  17. package/users/item/calendar/events/item/instances/index.d.ts +3 -3
  18. package/users/item/calendar/events/item/instances/item/exceptionOccurrences/index.d.ts +3 -3
  19. package/users/item/calendar/events/item/instances/item/exceptionOccurrences/item/index.d.ts +3 -3
  20. package/users/item/calendar/events/item/instances/item/index.d.ts +3 -3
  21. package/users/item/calendarGroups/item/calendars/item/calendarView/item/exceptionOccurrences/index.d.ts +3 -3
  22. package/users/item/calendarGroups/item/calendars/item/calendarView/item/exceptionOccurrences/item/index.d.ts +3 -3
  23. package/users/item/calendarGroups/item/calendars/item/calendarView/item/exceptionOccurrences/item/instances/index.d.ts +3 -3
  24. package/users/item/calendarGroups/item/calendars/item/calendarView/item/exceptionOccurrences/item/instances/item/index.d.ts +3 -3
  25. package/users/item/calendarGroups/item/calendars/item/calendarView/item/instances/index.d.ts +3 -3
  26. package/users/item/calendarGroups/item/calendars/item/calendarView/item/instances/item/exceptionOccurrences/index.d.ts +3 -3
  27. package/users/item/calendarGroups/item/calendars/item/calendarView/item/instances/item/exceptionOccurrences/item/index.d.ts +3 -3
  28. package/users/item/calendarGroups/item/calendars/item/calendarView/item/instances/item/index.d.ts +3 -3
  29. package/users/item/calendarGroups/item/calendars/item/events/item/exceptionOccurrences/index.d.ts +3 -3
  30. package/users/item/calendarGroups/item/calendars/item/events/item/exceptionOccurrences/item/index.d.ts +3 -3
  31. package/users/item/calendarGroups/item/calendars/item/events/item/exceptionOccurrences/item/instances/index.d.ts +3 -3
  32. package/users/item/calendarGroups/item/calendars/item/events/item/exceptionOccurrences/item/instances/item/index.d.ts +3 -3
  33. package/users/item/calendarGroups/item/calendars/item/events/item/instances/index.d.ts +3 -3
  34. package/users/item/calendarGroups/item/calendars/item/events/item/instances/item/exceptionOccurrences/index.d.ts +3 -3
  35. package/users/item/calendarGroups/item/calendars/item/events/item/instances/item/exceptionOccurrences/item/index.d.ts +3 -3
  36. package/users/item/calendarGroups/item/calendars/item/events/item/instances/item/index.d.ts +3 -3
  37. package/users/item/calendarView/item/exceptionOccurrences/index.d.ts +3 -3
  38. package/users/item/calendarView/item/exceptionOccurrences/item/index.d.ts +3 -3
  39. package/users/item/calendarView/item/exceptionOccurrences/item/instances/index.d.ts +3 -3
  40. package/users/item/calendarView/item/exceptionOccurrences/item/instances/item/index.d.ts +3 -3
  41. package/users/item/calendarView/item/instances/index.d.ts +3 -3
  42. package/users/item/calendarView/item/instances/item/exceptionOccurrences/index.d.ts +3 -3
  43. package/users/item/calendarView/item/instances/item/exceptionOccurrences/item/index.d.ts +3 -3
  44. package/users/item/calendarView/item/instances/item/index.d.ts +3 -3
  45. package/users/item/calendars/item/calendarView/item/exceptionOccurrences/index.d.ts +3 -3
  46. package/users/item/calendars/item/calendarView/item/exceptionOccurrences/item/index.d.ts +3 -3
  47. package/users/item/calendars/item/calendarView/item/exceptionOccurrences/item/instances/index.d.ts +3 -3
  48. package/users/item/calendars/item/calendarView/item/exceptionOccurrences/item/instances/item/index.d.ts +3 -3
  49. package/users/item/calendars/item/calendarView/item/instances/index.d.ts +3 -3
  50. package/users/item/calendars/item/calendarView/item/instances/item/exceptionOccurrences/index.d.ts +3 -3
  51. package/users/item/calendars/item/calendarView/item/instances/item/exceptionOccurrences/item/index.d.ts +3 -3
  52. package/users/item/calendars/item/calendarView/item/instances/item/index.d.ts +3 -3
  53. package/users/item/calendars/item/events/item/exceptionOccurrences/index.d.ts +3 -3
  54. package/users/item/calendars/item/events/item/exceptionOccurrences/item/index.d.ts +3 -3
  55. package/users/item/calendars/item/events/item/exceptionOccurrences/item/instances/index.d.ts +3 -3
  56. package/users/item/calendars/item/events/item/exceptionOccurrences/item/instances/item/index.d.ts +3 -3
  57. package/users/item/calendars/item/events/item/instances/index.d.ts +3 -3
  58. package/users/item/calendars/item/events/item/instances/item/exceptionOccurrences/index.d.ts +3 -3
  59. package/users/item/calendars/item/events/item/instances/item/exceptionOccurrences/item/index.d.ts +3 -3
  60. package/users/item/calendars/item/events/item/instances/item/index.d.ts +3 -3
  61. package/users/item/events/item/exceptionOccurrences/index.d.ts +3 -3
  62. package/users/item/events/item/exceptionOccurrences/item/index.d.ts +3 -3
  63. package/users/item/events/item/exceptionOccurrences/item/instances/index.d.ts +3 -3
  64. package/users/item/events/item/exceptionOccurrences/item/instances/item/index.d.ts +3 -3
  65. package/users/item/events/item/instances/index.d.ts +3 -3
  66. package/users/item/events/item/instances/item/exceptionOccurrences/index.d.ts +3 -3
  67. package/users/item/events/item/instances/item/exceptionOccurrences/item/index.d.ts +3 -3
  68. package/users/item/events/item/instances/item/index.d.ts +3 -3
  69. package/users/item/index.d.ts +3 -3
package/README.md CHANGED
@@ -1,11 +1,196 @@
1
1
  # `@microsoft/msgraph-sdk-users`
2
2
 
3
- > TODO: description
3
+ Get started with the Microsoft Graph SDK for TypeScript by integrating the [Microsoft Graph API](https://learn.microsoft.com/graph/overview) into your TypeScript application!
4
4
 
5
- ## Usage
5
+ This package provides a fluent API for interacting with Microsoft Graph administrative functions.
6
6
 
7
+ > [!NOTE]
8
+ > This package requires the `@microsoft/msgraph-sdk` package. It allows you to build applications using the [v1.0](https://learn.microsoft.com/graph/use-the-api#version) of Microsoft Graph. If you want to try the latest Microsoft Graph APIs, use our [beta SDK](https://github.com/microsoftgraph/msgraph-beta-sdk-typescript) instead.
9
+
10
+
11
+ ## 1. Installation
12
+
13
+ To install the package, use npm:
14
+
15
+ ```shell
16
+ # this will install the main package
17
+ npm install @microsoft/msgraph-sdk
18
+ # this will install the authentication provider for Azure Identity / Microsoft Entra
19
+ npm install @microsoft/kiota-authentication-azure @azure/identity
20
+ # this will install the fluent API package for the administrative API paths
21
+ npm install @microsoft/msgraph-sdk-users
7
22
  ```
8
- const msgraphSdkJavascriptUsers = require('@microsoft/msgraph-sdk-users');
9
23
 
10
- // TODO: DEMONSTRATE API
24
+ ## 2. Getting started
25
+
26
+ > Note: we are working to add the getting started information for Typescript to our public documentation, in the meantime the following sample should help you getting started.
27
+
28
+ ### 2.1 Register your application
29
+
30
+ Register your application by following the steps at [Register your app with the Microsoft Identity Platform](https://learn.microsoft.com/graph/auth-register-app-v2).
31
+
32
+ ### 2.2 Create an AuthenticationProvider object
33
+
34
+ An instance of the **GraphServiceClient** class handles building client. To create a new instance of this class, you need to provide an instance of **AuthenticationProvider**, which can authenticate requests to Microsoft Graph.
35
+
36
+ <!-- TODO restore that and remove the snippets below once the SDK hits GA and the public documentation has been updated -->
37
+ <!-- For an example of how to get an authentication provider, see [choose a Microsoft Graph authentication provider](https://learn.microsoft.com/graph/sdks/choose-authentication-providers?tabs=typescript). -->
38
+
39
+ #### 2.2.1 Authorization Code Provider
40
+
41
+ ```TypeScript
42
+ // @azure/identity
43
+ const credential = new AuthorizationCodeCredential(
44
+ 'YOUR_TENANT_ID',
45
+ 'YOUR_CLIENT_ID',
46
+ 'YOUR_CLIENT_SECRET',
47
+ 'AUTHORIZATION_CODE',
48
+ 'REDIRECT_URL',
49
+ );
50
+
51
+ // @microsoft/kiota-authentication-azure
52
+ const authProvider = new AzureIdentityAuthenticationProvider(credential, ["User.Read"]);
11
53
  ```
54
+
55
+ #### 2.2.2 Client Credentials Provider
56
+
57
+ ##### With a certificate
58
+
59
+ ```TypeScript
60
+ // @azure/identity
61
+ const credential = new ClientCertificateCredential(
62
+ 'YOUR_TENANT_ID',
63
+ 'YOUR_CLIENT_ID',
64
+ 'YOUR_CERTIFICATE_PATH',
65
+ );
66
+
67
+ // @microsoft/kiota-authentication-azure
68
+ const authProvider = new AzureIdentityAuthenticationProvider(credential, ["https://graph.microsoft.com/.default"]);
69
+ ```
70
+
71
+ ##### With a secret
72
+
73
+ ```TypeScript
74
+ // @azure/identity
75
+ const credential = new ClientSecretCredential(
76
+ 'YOUR_TENANT_ID',
77
+ 'YOUR_CLIENT_ID',
78
+ 'YOUR_CLIENT_SECRET',
79
+ );
80
+
81
+ // @microsoft/kiota-authentication-azure
82
+ const authProvider = new AzureIdentityAuthenticationProvider(credential, ["https://graph.microsoft.com/.default"]);
83
+ ```
84
+
85
+ #### 2.2.3 On-behalf-of provider
86
+
87
+ ```TypeScript
88
+ // @azure/identity
89
+ const credential = new OnBehalfOfCredential({
90
+ tenantId: 'YOUR_TENANT_ID',
91
+ clientId: 'YOUR_CLIENT_ID',
92
+ clientSecret: 'YOUR_CLIENT_SECRET',
93
+ userAssertionToken: 'JWT_TOKEN_TO_EXCHANGE',
94
+ });
95
+
96
+ // @microsoft/kiota-authentication-azure
97
+ const authProvider = new AzureIdentityAuthenticationProvider(credential, ["https://graph.microsoft.com/.default"]);
98
+ ```
99
+
100
+ #### 2.2.4 Device code provider
101
+
102
+ ```TypeScript
103
+ // @azure/identity
104
+ const credential = new DeviceCodeCredential({
105
+ tenantId: 'YOUR_TENANT_ID',
106
+ clientId: 'YOUR_CLIENT_ID',
107
+ userPromptCallback: (info) => {
108
+ console.log(info.message);
109
+ },
110
+ });
111
+
112
+ // @microsoft/kiota-authentication-azure
113
+ const authProvider = new AzureIdentityAuthenticationProvider(credential, ["User.Read"]);
114
+ ```
115
+
116
+ #### 2.2.5 Interactive provider
117
+
118
+ ```TypeScript
119
+ // @azure/identity
120
+ const credential = new InteractiveBrowserCredential({
121
+ tenantId: 'YOUR_TENANT_ID',
122
+ clientId: 'YOUR_CLIENT_ID',
123
+ redirectUri: 'http://localhost',
124
+ });
125
+
126
+ // @microsoft/kiota-authentication-azure
127
+ const authProvider = new AzureIdentityAuthenticationProvider(credential, ["User.Read"]);
128
+ ```
129
+
130
+ #### 2.2.6 Username/password provider
131
+
132
+ ```TypeScript
133
+ // @azure/identity
134
+ const credential = new UsernamePasswordCredential(
135
+ 'YOUR_TENANT_ID',
136
+ 'YOUR_CLIENT_ID',
137
+ 'YOUR_USER_NAME',
138
+ 'YOUR_PASSWORD',
139
+ );
140
+
141
+ // @microsoft/kiota-authentication-azure
142
+ const authProvider = new AzureIdentityAuthenticationProvider(credential, ["User.Read"]);
143
+ ```
144
+
145
+ ### 2.3 Get a Graph Service Client Adapter object
146
+
147
+ You must get a **GraphServiceClient** object to make requests against the service.
148
+
149
+ ```typescript
150
+ const requestAdapter = new GraphRequestAdapter(authProvider);
151
+ const graphServiceClient = createGraphServiceClient(requestAdapter);
152
+ ```
153
+
154
+ ## 3. Make requests against the service
155
+
156
+ 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://learn.microsoft.com/graph/api/overview?view=graph-rest-1.0).
157
+
158
+ ### 3.1 Get user's detailed information
159
+
160
+ To retrieve the user's detailed information:
161
+
162
+ ```typescript
163
+ import { createGraphServiceClient, GraphRequestAdapter } from "@microsoft/msgraph-sdk";
164
+ import "@microsoft/msgraph-sdk-users"
165
+
166
+ const requestAdapter = new GraphRequestAdapter(authProvider);
167
+ const graphServiceClient = createGraphServiceClient(requestAdapter);
168
+
169
+ const users = graphServiceClient.users.get();
170
+ ```
171
+
172
+ ## 4. Documentation
173
+
174
+ For more detailed documentation, see:
175
+
176
+ * [Overview](https://learn.microsoft.com/graph/overview)
177
+ * [Collections](https://learn.microsoft.com/graph/sdks/paging)
178
+ * [Making requests](https://learn.microsoft.com/graph/sdks/create-requests)
179
+ * [Known issues](https://github.com/MicrosoftGraph/msgraph-sdk-typescript/issues)
180
+ * [Contributions](https://github.com/microsoftgraph/msgraph-sdk-typescript/blob/main/CONTRIBUTING.md)
181
+
182
+ ## 5. Issues
183
+
184
+ For known issues, see [issues](https://github.com/MicrosoftGraph/msgraph-sdk-typescript/issues).
185
+
186
+ ## 6. Contributions
187
+
188
+ The Microsoft Graph SDK is open for contribution. To contribute to this project, see [Contributing](https://github.com/microsoftgraph/msgraph-sdk-typescript/blob/main/CONTRIBUTING.md).
189
+
190
+ ## 7. License
191
+
192
+ Licensed under the [MIT license](https://github.com/microsoftgraph/msgraph-sdk-typescript/blob/main/LICENSE).
193
+
194
+ ## 8. Third-party notices
195
+
196
+ [Third-party notices](https://github.com/microsoftgraph/msgraph-sdk-typescript/blob/main/LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/msgraph-sdk-users",
3
- "version": "1.0.0-preview.55",
3
+ "version": "1.0.0-preview.57",
4
4
  "description": "Users fluent API for Microsoft Graph",
5
5
  "keywords": [
6
6
  "Microsoft",
@@ -37,5 +37,5 @@
37
37
  "typescript": "^5.3.3"
38
38
  },
39
39
  "type": "module",
40
- "gitHead": "4fed41b101ebd69522e2febb1b9ff4e41aeb6e02"
40
+ "gitHead": "2a6110df0ff3f617ccfdca60e407c9ac29e87846"
41
41
  }