-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds multiple account functionality. Closes #3587
- Loading branch information
1 parent
d53f0d9
commit 9914a06
Showing
27 changed files
with
2,053 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ const dictionary = [ | |
'historical', | ||
'home', | ||
'hub', | ||
'identity', | ||
'in', | ||
'info', | ||
'inheritance', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
import Global from '/docs/cmd/_global.mdx'; | ||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
# identity list | ||
|
||
Shows a list of currently signed in identities | ||
|
||
## Usage | ||
|
||
```sh | ||
m365 identity list [options] | ||
``` | ||
|
||
## Options | ||
|
||
<Global /> | ||
|
||
## Remarks | ||
|
||
If you are logged in to Microsoft 365, the `identity list` command will show you a list of users and/or applications used to sign in and the details about the stored refresh and access tokens and their expiration date and time when run in debug mode. | ||
|
||
## Examples | ||
|
||
Show the list of available identities used to sign in to Microsoft 365 | ||
|
||
```sh | ||
m365 identity list | ||
``` | ||
|
||
## Response | ||
|
||
<Tabs> | ||
<TabItem value="JSON"> | ||
|
||
```json | ||
[ | ||
{ | ||
"connectedAs": "alexw@contoso.com", | ||
"identityId": "028de82d-7fd9-476e-a9fd-be9714280ff3", | ||
"authType": "DeviceCode", | ||
"appId": "31359c7f-bd7e-475c-86db-fdb8c937548e", | ||
"appTenant": "common", | ||
"cloudType": "Public" | ||
}, | ||
{ | ||
"connectedAs": "Contoso Application", | ||
"identityId": "acd6df42-10a9-4315-8928-53334f1c9d01", | ||
"authType": "Secret", | ||
"appId": "39446e2e-5081-4887-980c-f285919fccca", | ||
"appTenant": "db308122-52f3-4241-af92-1734aa6e2e50", | ||
"cloudType": "Public" | ||
} | ||
] | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="Text"> | ||
|
||
```text | ||
connectedAs authType | ||
------------------------------------ ----------------------------------------------- | ||
alexw@contoso.com DeviceCode | ||
Contoso Application Secret | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="CSV"> | ||
|
||
```csv | ||
connectedAs,identityId,authType,appId,appTenant,cloudType | ||
alexw@contoso.com,028de82d-7fd9-476e-a9fd-be9714280ff3,DeviceCode,31359c7f-bd7e-475c-86db-fdb8c937548e,common,Public | ||
Contoso Application,acd6df42-10a9-4315-8928-53334f1c9d01,Secret,39446e2e-5081-4887-980c-f285919fccca,db308122-52f3-4241-af92-1734aa6e2e50,Public | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="Markdown"> | ||
|
||
```md | ||
# identity list | ||
|
||
Date: 7/2/2023 | ||
|
||
Property | Value | ||
---------|------- | ||
connectedAs | alexw@contoso.com | ||
identityId | 028de82d-7fd9-476e-a9fd-be9714280ff3 | ||
authType | DeviceCode | ||
appId | 31359c7f-bd7e-475c-86db-fdb8c937548e | ||
appTenant | common | ||
cloudType | Public | ||
|
||
Property | Value | ||
---------|------- | ||
connectedAs | Contoso Application | ||
identityId | acd6df42-10a9-4315-8928-53334f1c9d01 | ||
authType | Secret | ||
appId | 39446e2e-5081-4887-980c-f285919fccca | ||
appTenant | db308122-52f3-4241-af92-1734aa6e2e50 | ||
cloudType | Public | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
import Global from '/docs/cmd/_global.mdx'; | ||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
# identity set | ||
|
||
Switches to another identity, when signed into multiple identities | ||
|
||
## Usage | ||
|
||
```sh | ||
m365 identity set [options] | ||
``` | ||
|
||
## Options | ||
|
||
```md definition-list | ||
`-i, --id [id]` | ||
: The Id (GUID) of the identity to switch to. Specify either `id` or `name` but not both. | ||
|
||
`-n, --name [name]` | ||
: The name of the identity to switch to. Specify either `id` or `name` but not both. | ||
``` | ||
|
||
<Global /> | ||
|
||
## Remarks | ||
|
||
The values for `--id` or `--name` can be found by running [m365 identity list](identity-list.mdx). | ||
|
||
## Examples | ||
|
||
Switch to a user identity by name | ||
|
||
```sh | ||
m365 identity set --name 'alexw@contoso.com' | ||
``` | ||
|
||
Switch to a given identity by id | ||
|
||
```sh | ||
m365 identity set --id '6e70c8ea-571d-4daf-bc48-9e1b49ac3390' | ||
``` | ||
|
||
Switch to an application identity by name | ||
|
||
```sh | ||
m365 identity set --name 'My contoso application' | ||
``` | ||
|
||
## Response | ||
|
||
<Tabs> | ||
<TabItem value="JSON"> | ||
|
||
```json | ||
{ | ||
"connectedAs": "alexw@contoso.com", | ||
"identityId": "028de82d-7fd9-476e-a9fd-be9714280ff3", | ||
"authType": "DeviceCode", | ||
"appId": "31359c7f-bd7e-475c-86db-fdb8c937548e", | ||
"appTenant": "common", | ||
"cloudType": "Public" | ||
} | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="Text"> | ||
|
||
```text | ||
appId : 31359c7f-bd7e-475c-86db-fdb8c937548e | ||
identityId : 028de82d-7fd9-476e-a9fd-be9714280ff3 | ||
appTenant : common | ||
authType : DeviceCode | ||
connectedAs: alexw@contoso.com | ||
cloudType : Public | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="CSV"> | ||
|
||
```csv | ||
connectedAs,authType,appId,appTenant,cloudType | ||
alexw@contoso.com,028de82d-7fd9-476e-a9fd-be9714280ff3,DeviceCode,31359c7f-bd7e-475c-86db-fdb8c937548e,common,Public | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="Markdown"> | ||
|
||
```md | ||
# identity set | ||
|
||
Date: 7/2/2023 | ||
|
||
Property | Value | ||
---------|------- | ||
connectedAs | alexw@contoso.com | ||
identityId | 028de82d-7fd9-476e-a9fd-be9714280ff3 | ||
authType | DeviceCode | ||
appId | 31359c7f-bd7e-475c-86db-fdb8c937548e | ||
appTenant | common | ||
cloudType | Public | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.