Skip to content

Commit 1b556a1

Browse files
authored
Merge pull request MicrosoftDocs#254 from msewaweru/freshness-get-started-article
Freshness work for the get started article
2 parents d9c9bf1 + b60704e commit 1b556a1

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

microsoftgraph/docs-conceptual/get-started.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ description: "Get started with the Microsoft Graph PowerShell SDK by using it pe
55
author: jasonjoh
66
manager: CelesteDG
77
ms.topic: quickstart
8-
ms.date: 04/07/2022
8+
ms.date: 04/25/2023
99
ms.author: jasonjoh
1010
---
1111

1212
# Get started with the Microsoft Graph PowerShell SDK
1313

14-
In this guide, you'll use the Microsoft Graph PowerShell SDK to perform some basic tasks. If you haven't already [installed the SDK](installation.md), do so before following this guide.
14+
In this guide, you'll use the Microsoft Graph PowerShell SDK to perform some basic tasks. If you haven't already, [install the SDK](installation.md) before following this guide.
1515

1616
## API version
1717

18-
By default, the SDK uses the [Microsoft Graph REST API v1.0](/graph/api/overview?view=graph-rest-1.0&preserve-view=true). You can change the profile by using the `Select-MgProfile` command.
18+
By default, the SDK uses the [Microsoft Graph REST API v1.0](/graph/api/overview?view=graph-rest-1.0&preserve-view=true). Cmdlets are available for the API version that is selected. You can change the profile by using the `Select-MgProfile` command.
1919

2020
```powershell
2121
Select-MgProfile -Name "beta"
@@ -31,14 +31,14 @@ For details on using app-only access for unattended scenarios, see [Use app-only
3131

3232
Each API in the Microsoft Graph is protected by one or more permission scopes. The user logging in must consent to one of the required scopes for the APIs you plan to use. In this example, we'll use the following APIs.
3333

34-
- [List users](/graph/api/user-list?view=graph-rest-1.0&preserve-view=true) to find the user ID of the logged-in user
34+
- [List users](/graph/api/user-list?view=graph-rest-1.0&preserve-view=true) to find the user ID of the logged-in user.
3535
- [List joinedTeams](/graph/api/user-list-joinedteams?view=graph-rest-1.0&preserve-view=true) to get the Teams the user is a member of.
3636
- [List channels](/graph/api/channel-list?view=graph-rest-1.0&preserve-view=true) to get the channels in a Team.
37-
- [Send message](/graph/api/channel-post-messages?view=graph-rest-1.0&preserve-view=true) to send a message to a Team channel.
37+
- [Send message](/graph/api/channel-post-messages?view=graph-rest-1.0&preserve-view=true) to send a message to a Team's channel.
3838

3939
The `User.Read.All` permission scope will enable the first two calls, and the `Group.ReadWrite.All` scope will enable the rest. These permissions require an admin account.
4040

41-
### Using Find-MgGraphCommand to find required permissions
41+
#### Using Find-MgGraphCommand to find required permissions
4242

4343
The `Find-MgGraphCommand` cmdlet can be used to discover the required permissions for another cmdlet. For example, to see all permissions that can be used to call `Get-MgUser`, run;
4444

@@ -81,7 +81,7 @@ Now that you're signed in, you can start making calls to Microsoft Graph.
8181

8282
### Get the signed-in user
8383

84-
In this section, you'll locate the signed-in user and get their user ID. You'll need that to use as a parameter to the other commands you'll use later. Start by running the following command.
84+
In this section, you'll locate the signed-in user and get their user Id. You'll need the user Id as a parameter to the other commands you'll run later. Start by running the following command.
8585

8686
```powershell
8787
Get-MgUser
@@ -103,7 +103,7 @@ ce73bdb5-bf12-405e-ab85-40122fdd6eb7 Brian Johnson (TAILSPIN) [email protected]
103103
df1347a3-7ce7-4b4d-8aab-7c65b5c907b9 Cameron White CameronW@contoso…
104104
```
105105

106-
You can use an [OData filter](/graph/query-parameters#filter-parameter) to help locate the specific user you want. Run the following command, replacing `Megan Bowen` with the display name of the user you signed in with.
106+
You can use an [OData filter](use-query-parameters.md#filter-parameter) to help locate the specific user you want. Run the following command, replacing `Megan Bowen` with the display name of the user you signed in with.
107107

108108
```powershell
109109
$user = Get-MgUser -Filter "displayName eq 'Megan Bowen'"
@@ -117,7 +117,7 @@ $user.DisplayName
117117

118118
### List the user's joined teams
119119

120-
Now use the user's ID as a parameter to the `Get-MgUserJoinedTeam` command.
120+
Now use the user's Id as a parameter to the `Get-MgUserJoinedTeam` command.
121121

122122
```powershell
123123
Get-MgUserJoinedTeam -UserId $user.Id
@@ -127,7 +127,7 @@ Just like the `Get-MgUser` command, this command gives a list of teams. Select o
127127

128128
### List team channels
129129

130-
Now use the team's ID as a parameter to the `Get-MgTeamChannel` command, following a similar pattern of listing all channels, then filtering the list to get the specific channel you want.
130+
Now use the team's Id as a parameter to the `Get-MgTeamChannel` command, following a similar pattern of listing all channels, then filtering the list to get the specific channel you want.
131131

132132
```powershell
133133
Get-MgTeamChannel -TeamId $team.Id
@@ -136,13 +136,13 @@ $channel = Get-MgTeamChannel -TeamId ID_FROM_PREVIOUS_STEP -Filter "displayName
136136

137137
### Send a message
138138

139-
Now that you have both the Team ID and the channel ID, you can post a message to the channel. Use the following command to send the message.
139+
Now that you have both the Team Id and the channel Id, you can post a message to the channel. Use the following command to send the message.
140140

141141
```powershell
142142
New-MgTeamChannelMessage -TeamId $team.Id -ChannelId $channel.Id -Body @{ Content="Hello World" }
143143
```
144144

145-
This command differs from the previous commands you used. Instead of querying data, it's actually creating something. In Microsoft Graph, this command translates to an HTTP `POST`, and it requires an object in the body of that post. In this case, the object is a [chatMessage](/graph/api/resources/chatmessage). The `-Body` parameter to the command maps to the `body` property on `chatMessage`. Other properties are mapped in a similar way, so you can change the message you send. For example, to send an urgent message use the following command.
145+
This command differs from the previous commands you used. Instead of querying data, it's creating something. In Microsoft Graph, this command translates to an HTTP `POST`, and it requires an object in the body of that post. In this case, the object is a [chatMessage](/graph/api/resources/chatmessage). The `-Body` parameter to the command maps to the `body` property on `chatMessage`. Other properties are mapped in a similar way, so you can change the message you send. For example, to send an urgent message use the following command.
146146

147147
```powershell
148148
New-MgTeamChannelMessage -TeamId $team.Id -ChannelId $channel.Id -Body @{ Content="Hello World" } -Importance "urgent"

0 commit comments

Comments
 (0)