@microsoft/msgraph-sdk-users 1.0.0-preview.55 → 1.0.0-preview.58
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.
- package/README.md +186 -4
- package/package.json +2 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/users/index.d.ts +4 -4
- package/users/item/calendar/calendarView/item/exceptionOccurrences/index.d.ts +3 -3
- package/users/item/calendar/calendarView/item/exceptionOccurrences/item/index.d.ts +3 -3
- package/users/item/calendar/calendarView/item/exceptionOccurrences/item/instances/index.d.ts +3 -3
- package/users/item/calendar/calendarView/item/exceptionOccurrences/item/instances/item/index.d.ts +3 -3
- package/users/item/calendar/calendarView/item/instances/index.d.ts +3 -3
- package/users/item/calendar/calendarView/item/instances/item/exceptionOccurrences/index.d.ts +3 -3
- package/users/item/calendar/calendarView/item/instances/item/exceptionOccurrences/item/index.d.ts +3 -3
- package/users/item/calendar/calendarView/item/instances/item/index.d.ts +3 -3
- package/users/item/calendar/events/item/exceptionOccurrences/index.d.ts +3 -3
- package/users/item/calendar/events/item/exceptionOccurrences/item/index.d.ts +3 -3
- package/users/item/calendar/events/item/exceptionOccurrences/item/instances/index.d.ts +3 -3
- package/users/item/calendar/events/item/exceptionOccurrences/item/instances/item/index.d.ts +3 -3
- package/users/item/calendar/events/item/instances/index.d.ts +3 -3
- package/users/item/calendar/events/item/instances/item/exceptionOccurrences/index.d.ts +3 -3
- package/users/item/calendar/events/item/instances/item/exceptionOccurrences/item/index.d.ts +3 -3
- package/users/item/calendar/events/item/instances/item/index.d.ts +3 -3
- package/users/item/calendarGroups/item/calendars/item/calendarView/item/exceptionOccurrences/index.d.ts +3 -3
- package/users/item/calendarGroups/item/calendars/item/calendarView/item/exceptionOccurrences/item/index.d.ts +3 -3
- package/users/item/calendarGroups/item/calendars/item/calendarView/item/exceptionOccurrences/item/instances/index.d.ts +3 -3
- package/users/item/calendarGroups/item/calendars/item/calendarView/item/exceptionOccurrences/item/instances/item/index.d.ts +3 -3
- package/users/item/calendarGroups/item/calendars/item/calendarView/item/instances/index.d.ts +3 -3
- package/users/item/calendarGroups/item/calendars/item/calendarView/item/instances/item/exceptionOccurrences/index.d.ts +3 -3
- package/users/item/calendarGroups/item/calendars/item/calendarView/item/instances/item/exceptionOccurrences/item/index.d.ts +3 -3
- package/users/item/calendarGroups/item/calendars/item/calendarView/item/instances/item/index.d.ts +3 -3
- package/users/item/calendarGroups/item/calendars/item/events/item/exceptionOccurrences/index.d.ts +3 -3
- package/users/item/calendarGroups/item/calendars/item/events/item/exceptionOccurrences/item/index.d.ts +3 -3
- package/users/item/calendarGroups/item/calendars/item/events/item/exceptionOccurrences/item/instances/index.d.ts +3 -3
- package/users/item/calendarGroups/item/calendars/item/events/item/exceptionOccurrences/item/instances/item/index.d.ts +3 -3
- package/users/item/calendarGroups/item/calendars/item/events/item/instances/index.d.ts +3 -3
- package/users/item/calendarGroups/item/calendars/item/events/item/instances/item/exceptionOccurrences/index.d.ts +3 -3
- package/users/item/calendarGroups/item/calendars/item/events/item/instances/item/exceptionOccurrences/item/index.d.ts +3 -3
- package/users/item/calendarGroups/item/calendars/item/events/item/instances/item/index.d.ts +3 -3
- package/users/item/calendarView/item/exceptionOccurrences/index.d.ts +3 -3
- package/users/item/calendarView/item/exceptionOccurrences/item/index.d.ts +3 -3
- package/users/item/calendarView/item/exceptionOccurrences/item/instances/index.d.ts +3 -3
- package/users/item/calendarView/item/exceptionOccurrences/item/instances/item/index.d.ts +3 -3
- package/users/item/calendarView/item/instances/index.d.ts +3 -3
- package/users/item/calendarView/item/instances/item/exceptionOccurrences/index.d.ts +3 -3
- package/users/item/calendarView/item/instances/item/exceptionOccurrences/item/index.d.ts +3 -3
- package/users/item/calendarView/item/instances/item/index.d.ts +3 -3
- package/users/item/calendars/item/calendarView/item/exceptionOccurrences/index.d.ts +3 -3
- package/users/item/calendars/item/calendarView/item/exceptionOccurrences/item/index.d.ts +3 -3
- package/users/item/calendars/item/calendarView/item/exceptionOccurrences/item/instances/index.d.ts +3 -3
- package/users/item/calendars/item/calendarView/item/exceptionOccurrences/item/instances/item/index.d.ts +3 -3
- package/users/item/calendars/item/calendarView/item/instances/index.d.ts +3 -3
- package/users/item/calendars/item/calendarView/item/instances/item/exceptionOccurrences/index.d.ts +3 -3
- package/users/item/calendars/item/calendarView/item/instances/item/exceptionOccurrences/item/index.d.ts +3 -3
- package/users/item/calendars/item/calendarView/item/instances/item/index.d.ts +3 -3
- package/users/item/calendars/item/events/item/exceptionOccurrences/index.d.ts +3 -3
- package/users/item/calendars/item/events/item/exceptionOccurrences/item/index.d.ts +3 -3
- package/users/item/calendars/item/events/item/exceptionOccurrences/item/instances/index.d.ts +3 -3
- package/users/item/calendars/item/events/item/exceptionOccurrences/item/instances/item/index.d.ts +3 -3
- package/users/item/calendars/item/events/item/instances/index.d.ts +3 -3
- package/users/item/calendars/item/events/item/instances/item/exceptionOccurrences/index.d.ts +3 -3
- package/users/item/calendars/item/events/item/instances/item/exceptionOccurrences/item/index.d.ts +3 -3
- package/users/item/calendars/item/events/item/instances/item/index.d.ts +3 -3
- package/users/item/events/item/exceptionOccurrences/index.d.ts +3 -3
- package/users/item/events/item/exceptionOccurrences/item/index.d.ts +3 -3
- package/users/item/events/item/exceptionOccurrences/item/instances/index.d.ts +3 -3
- package/users/item/events/item/exceptionOccurrences/item/instances/item/index.d.ts +3 -3
- package/users/item/events/item/instances/index.d.ts +3 -3
- package/users/item/events/item/instances/item/exceptionOccurrences/index.d.ts +3 -3
- package/users/item/events/item/instances/item/exceptionOccurrences/item/index.d.ts +3 -3
- package/users/item/events/item/instances/item/index.d.ts +3 -3
- package/users/item/index.d.ts +1 -1
- package/users/item/joinedTeams/item/schedule/timeCards/clockIn/index.d.ts +4 -0
- package/users/item/joinedTeams/item/schedule/timeCards/clockIn/index.d.ts.map +1 -1
- package/users/item/joinedTeams/item/schedule/timeCards/clockIn/index.js +2 -0
- package/users/item/joinedTeams/item/schedule/timeCards/clockIn/index.js.map +1 -1
- package/users/item/presence/index.d.ts +4 -4
package/README.md
CHANGED
|
@@ -1,11 +1,193 @@
|
|
|
1
1
|
# `@microsoft/msgraph-sdk-users`
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
5
|
+
This package provides a fluent API for interacting with Microsoft Graph administrative functions.
|
|
6
6
|
|
|
7
|
+
> [!NOTE]
|
|
8
|
+
> This package 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
|
+
## 1. Installation
|
|
11
|
+
|
|
12
|
+
To install the package, use npm:
|
|
13
|
+
|
|
14
|
+
```shell
|
|
15
|
+
# this will install the authentication provider for Azure Identity / Microsoft Entra
|
|
16
|
+
npm install @microsoft/kiota-authentication-azure @azure/identity
|
|
17
|
+
# this will install the fluent API package for the administrative API paths
|
|
18
|
+
npm install @microsoft/msgraph-sdk-users
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 2. Getting started
|
|
22
|
+
|
|
23
|
+
> 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.
|
|
24
|
+
|
|
25
|
+
### 2.1 Register your application
|
|
26
|
+
|
|
27
|
+
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).
|
|
28
|
+
|
|
29
|
+
### 2.2 Create an AuthenticationProvider object
|
|
30
|
+
|
|
31
|
+
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.
|
|
32
|
+
|
|
33
|
+
<!-- TODO restore that and remove the snippets below once the SDK hits GA and the public documentation has been updated -->
|
|
34
|
+
<!-- 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). -->
|
|
35
|
+
|
|
36
|
+
#### 2.2.1 Authorization Code Provider
|
|
37
|
+
|
|
38
|
+
```TypeScript
|
|
39
|
+
// @azure/identity
|
|
40
|
+
const credential = new AuthorizationCodeCredential(
|
|
41
|
+
'YOUR_TENANT_ID',
|
|
42
|
+
'YOUR_CLIENT_ID',
|
|
43
|
+
'YOUR_CLIENT_SECRET',
|
|
44
|
+
'AUTHORIZATION_CODE',
|
|
45
|
+
'REDIRECT_URL',
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
// @microsoft/kiota-authentication-azure
|
|
49
|
+
const authProvider = new AzureIdentityAuthenticationProvider(credential, ["User.Read"]);
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
#### 2.2.2 Client Credentials Provider
|
|
53
|
+
|
|
54
|
+
##### With a certificate
|
|
55
|
+
|
|
56
|
+
```TypeScript
|
|
57
|
+
// @azure/identity
|
|
58
|
+
const credential = new ClientCertificateCredential(
|
|
59
|
+
'YOUR_TENANT_ID',
|
|
60
|
+
'YOUR_CLIENT_ID',
|
|
61
|
+
'YOUR_CERTIFICATE_PATH',
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
// @microsoft/kiota-authentication-azure
|
|
65
|
+
const authProvider = new AzureIdentityAuthenticationProvider(credential, ["https://graph.microsoft.com/.default"]);
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
##### With a secret
|
|
69
|
+
|
|
70
|
+
```TypeScript
|
|
71
|
+
// @azure/identity
|
|
72
|
+
const credential = new ClientSecretCredential(
|
|
73
|
+
'YOUR_TENANT_ID',
|
|
74
|
+
'YOUR_CLIENT_ID',
|
|
75
|
+
'YOUR_CLIENT_SECRET',
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
// @microsoft/kiota-authentication-azure
|
|
79
|
+
const authProvider = new AzureIdentityAuthenticationProvider(credential, ["https://graph.microsoft.com/.default"]);
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
#### 2.2.3 On-behalf-of provider
|
|
83
|
+
|
|
84
|
+
```TypeScript
|
|
85
|
+
// @azure/identity
|
|
86
|
+
const credential = new OnBehalfOfCredential({
|
|
87
|
+
tenantId: 'YOUR_TENANT_ID',
|
|
88
|
+
clientId: 'YOUR_CLIENT_ID',
|
|
89
|
+
clientSecret: 'YOUR_CLIENT_SECRET',
|
|
90
|
+
userAssertionToken: 'JWT_TOKEN_TO_EXCHANGE',
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// @microsoft/kiota-authentication-azure
|
|
94
|
+
const authProvider = new AzureIdentityAuthenticationProvider(credential, ["https://graph.microsoft.com/.default"]);
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
#### 2.2.4 Device code provider
|
|
98
|
+
|
|
99
|
+
```TypeScript
|
|
100
|
+
// @azure/identity
|
|
101
|
+
const credential = new DeviceCodeCredential({
|
|
102
|
+
tenantId: 'YOUR_TENANT_ID',
|
|
103
|
+
clientId: 'YOUR_CLIENT_ID',
|
|
104
|
+
userPromptCallback: (info) => {
|
|
105
|
+
console.log(info.message);
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// @microsoft/kiota-authentication-azure
|
|
110
|
+
const authProvider = new AzureIdentityAuthenticationProvider(credential, ["User.Read"]);
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
#### 2.2.5 Interactive provider
|
|
114
|
+
|
|
115
|
+
```TypeScript
|
|
116
|
+
// @azure/identity
|
|
117
|
+
const credential = new InteractiveBrowserCredential({
|
|
118
|
+
tenantId: 'YOUR_TENANT_ID',
|
|
119
|
+
clientId: 'YOUR_CLIENT_ID',
|
|
120
|
+
redirectUri: 'http://localhost',
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// @microsoft/kiota-authentication-azure
|
|
124
|
+
const authProvider = new AzureIdentityAuthenticationProvider(credential, ["User.Read"]);
|
|
7
125
|
```
|
|
8
|
-
const msgraphSdkJavascriptUsers = require('@microsoft/msgraph-sdk-users');
|
|
9
126
|
|
|
10
|
-
|
|
127
|
+
#### 2.2.6 Username/password provider
|
|
128
|
+
|
|
129
|
+
```TypeScript
|
|
130
|
+
// @azure/identity
|
|
131
|
+
const credential = new UsernamePasswordCredential(
|
|
132
|
+
'YOUR_TENANT_ID',
|
|
133
|
+
'YOUR_CLIENT_ID',
|
|
134
|
+
'YOUR_USER_NAME',
|
|
135
|
+
'YOUR_PASSWORD',
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
// @microsoft/kiota-authentication-azure
|
|
139
|
+
const authProvider = new AzureIdentityAuthenticationProvider(credential, ["User.Read"]);
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### 2.3 Get a Graph Service Client Adapter object
|
|
143
|
+
|
|
144
|
+
You must get a **GraphServiceClient** object to make requests against the service.
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
const requestAdapter = new GraphRequestAdapter(authProvider);
|
|
148
|
+
const graphServiceClient = createGraphServiceClient(requestAdapter);
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## 3. Make requests against the service
|
|
152
|
+
|
|
153
|
+
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).
|
|
154
|
+
|
|
155
|
+
### 3.1 Get user's detailed information
|
|
156
|
+
|
|
157
|
+
To retrieve the user's detailed information:
|
|
158
|
+
|
|
159
|
+
```typescript
|
|
160
|
+
import { createGraphServiceClient, GraphRequestAdapter } from "@microsoft/msgraph-sdk";
|
|
161
|
+
import "@microsoft/msgraph-sdk-users"
|
|
162
|
+
|
|
163
|
+
const requestAdapter = new GraphRequestAdapter(authProvider);
|
|
164
|
+
const graphServiceClient = createGraphServiceClient(requestAdapter);
|
|
165
|
+
|
|
166
|
+
const users = graphServiceClient.users.get();
|
|
11
167
|
```
|
|
168
|
+
|
|
169
|
+
## 4. Documentation
|
|
170
|
+
|
|
171
|
+
For more detailed documentation, see:
|
|
172
|
+
|
|
173
|
+
* [Overview](https://learn.microsoft.com/graph/overview)
|
|
174
|
+
* [Collections](https://learn.microsoft.com/graph/sdks/paging)
|
|
175
|
+
* [Making requests](https://learn.microsoft.com/graph/sdks/create-requests)
|
|
176
|
+
* [Known issues](https://github.com/MicrosoftGraph/msgraph-sdk-typescript/issues)
|
|
177
|
+
* [Contributions](https://github.com/microsoftgraph/msgraph-sdk-typescript/blob/main/CONTRIBUTING.md)
|
|
178
|
+
|
|
179
|
+
## 5. Issues
|
|
180
|
+
|
|
181
|
+
For known issues, see [issues](https://github.com/MicrosoftGraph/msgraph-sdk-typescript/issues).
|
|
182
|
+
|
|
183
|
+
## 6. Contributions
|
|
184
|
+
|
|
185
|
+
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).
|
|
186
|
+
|
|
187
|
+
## 7. License
|
|
188
|
+
|
|
189
|
+
Licensed under the [MIT license](https://github.com/microsoftgraph/msgraph-sdk-typescript/blob/main/LICENSE).
|
|
190
|
+
|
|
191
|
+
## 8. Third-party notices
|
|
192
|
+
|
|
193
|
+
[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.
|
|
3
|
+
"version": "1.0.0-preview.58",
|
|
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": "
|
|
40
|
+
"gitHead": "d363ba15cf74a576b0b7e7377d98a9bcfdbc7025"
|
|
41
41
|
}
|