Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 1bbfb89

Browse files
Update README.md
Update ReadMe with feedback on platform-specific installation instructions and FAQa
1 parent 3525418 commit 1bbfb89

File tree

1 file changed

+66
-21
lines changed

1 file changed

+66
-21
lines changed

README.md

Lines changed: 66 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,68 @@ A commandline tool should work on any terminal. We recommend:
88
- MacOS terminal
99
- PowerShell version 7.3.2
1010

11-
## Target project requirements
11+
## Installation
1212
Download the CLI SDK to get started for
1313
Windows, Mac, or Linux here on the assets link of the latest release: [CLI SDK Download](https://github.com/microsoftgraph/msgraph-cli/releases)
1414

15+
### Windows
16+
1. Extract downloaded CLI tool for Windows to folder
17+
2. Execute program using **mgc** (on Windows/Mac) or **./mgc** (on WSL or Linux) command
18+
19+
**Windows environment setup**
20+
21+
22+
### Mac
23+
1. Extract downloaded CLI tool for Mac to folder
24+
2. Execute program using **mgc** (on Windows/Mac) or **./mgc** (on WSL or Linux) command
25+
26+
**Mac environment setup**
27+
28+
29+
### Linux
30+
Download from browser OR via Curl
31+
``` bash
32+
curl -LO <link> && tar -xzf <filename>
33+
```
34+
35+
Add environment setup to ensure commands are not run every time. Edit environment files
36+
37+
>**Note:** For linux users please run the following commands before authenticating
38+
``` bash
39+
sudo apt install gnome-keyring libsecret-1-0
40+
41+
sudo setcap cap_ipc_lock=+ep $(which gnome-keyring-daemon)
42+
43+
export DBUS_SESSION_BUS_ADDRESS=$(dbus-daemon --session --fork --print-address)
44+
45+
export KEYRING_PASSWORD=any-password
46+
47+
dbus-run-session -- echo "$KEYRING_PASSWORD" | gnome-keyring-daemon --daemonize --components=secrets --unlock
48+
49+
mgc login
50+
```
51+
**Linux environment setup**
52+
53+
--insert steps here
54+
55+
### Using Docker
56+
Find docker instructions in the docker folder [here](https://github.com/microsoftgraph/msgraph-cli/tree/main/docker)
57+
58+
## Uninstalling
59+
1. Delete the CLI installation folder
60+
2. If path enviroment variable had been set, remove it.
1561

1662
## Registering an application in Azure AD
1763

18-
> **Note:** this step is required if your client will be calling APIs that are protected by the Microsoft Identity Platform like Microsoft Graph.
64+
> **Note:** this step is **NOT** required unless your client will be calling APIs that are protected by the Microsoft Identity Platform like Microsoft Graph OR using Client Certificate authentication option.
1965
2066
Follow the instructions in [Register an application for Microsoft identity platform authentication](register-app.md) to get an application ID (also know as a client ID).
2167

22-
### Creating the client application
23-
2468
Replace `YOUR_CLIENT_ID` with the client ID from your app registration.
2569

2670
## Executing the application
27-
Navigate to your download folder and use the **mgc** command to run commands on the CLI SDK.
71+
Navigate to your download folder and use the **mgc** (on Windows/Mac) or **./mgc** (on WSL or Linux) command to run commands on the CLI SDK.
72+
2873
Add -h to your commands to view additional commands.
2974

3075
## Authenticating on the CLI tool
@@ -41,8 +86,8 @@ mgc login --client-id `YOUR_CLIENT_ID` --tenant-id `YOUR_TENANT_ID` --scopes Use
4186
```
4287

4388
### **Delegated access**
44-
**1. DeviceCode authentication strategy**
4589

90+
**1. DeviceCode authentication strategy**
4691

4792
``` bash
4893
#Using the Default authentication (which is Device Code)
@@ -51,7 +96,7 @@ mgc login
5196
OR
5297

5398
``` bash
54-
#Using the DeviceCode authentication explicitly
99+
#Using the DeviceCode authentication explicitly
55100
mgc login --strategy DeviceCode
56101
```
57102

@@ -64,29 +109,29 @@ mgc login --strategy InteractiveBrowser
64109

65110
### **App-only access**
66111
**1. Client Certificate authentication strategy**
112+
> **Note:** Registering an application is required when using Client Certificate
113+
67114
``` bash
68115
# Using Client Certificate authentication.
69116
mgc login --strategy ClientCertificate
70117
```
71-
### **Linux users**
72-
73-
>**Note:** For linux users please run the following commands before authenticating
74-
``` bash
75-
sudo apt install gnome-keyring libsecret-1-0
76118

77-
sudo setcap cap_ipc_lock=+ep $(which gnome-keyring-daemon)
78-
79-
export DBUS_SESSION_BUS_ADDRESS=$(dbus-daemon --session --fork --print-address)
119+
## Permissions
120+
Add -h to your command to view information that contains documentation links with permissions
80121

81-
export KEYRING_PASSWORD=any-password
122+
## Check logged in user
123+
You can access the logged in user's details using:
124+
```bash
125+
mgc me get
126+
```
82127

83-
dbus-run-session -- echo "$KEYRING_PASSWORD" | gnome-keyring-daemon --daemonize --components=secrets --unlock
128+
## FAQs
129+
Qn: Why am I not getting a response back after running a command?
84130

85-
mgc login
86-
```
131+
Ans:add --debug to your command
87132

88-
### Samples
89-
You can find additional samples here: [CLI SDK samples](https://github.com/microsoftgraph/msgraph-cli/tree/main/samples)
133+
## Samples
134+
You can find additional samples here (contains sample commands for CMD, PowerShell & Bash) [CLI SDK samples](https://github.com/microsoftgraph/msgraph-cli/tree/main/samples)
90135

91136

92137
> Note: This repository is for the .NET CLI. If you are looking for the Python CLI, it's been moved to the [msgraph-cli-archived](https://github.com/microsoftgraph/msgraph-cli-archived) repository

0 commit comments

Comments
 (0)