-
Notifications
You must be signed in to change notification settings - Fork 370
Updates login command documentation. Closes #3725 #7051
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -118,54 +118,72 @@ Log in to Microsoft 365 using your own Microsoft Entra application and a persona | |
| m365 login --authType certificate --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --certificateFile /Users/user/dev/localhost.pfx --password 'pass@word1' | ||
| ``` | ||
|
|
||
| Log in to Microsoft 365 using a user name and password with `clientId` set in the configuration. | ||
| Log in to Microsoft 365 using a user name and password with the application and tenant specified. | ||
|
|
||
| ```sh | ||
| m365 login --authType password --userName [email protected] --password pass@word1 | ||
| m365 login --authType password --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --userName [email protected] --password pass@word1 | ||
| ``` | ||
|
|
||
| Log in to Microsoft 365 using a PEM certificate with `clientId` set in the configuration. | ||
| Log in to Microsoft 365 using a PEM certificate with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set. | ||
|
|
||
| ```sh | ||
| m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pem | ||
| ``` | ||
|
|
||
| Log in to Microsoft 365 using a PEM certificate with `clientId` set in the configuration. Use the specified thumbprint. | ||
| Log in to Microsoft 365 using a PEM certificate and a specific thumbprint with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set. | ||
|
|
||
| ```sh | ||
| m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pem --thumbprint 47C4885736C624E90491F32B98855AA8A7562AF1 | ||
| m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pem --thumbprint 47C4885736C624E90491F32B98855AA8A7562AF1 | ||
| ``` | ||
|
|
||
| Log in to Microsoft 365 using a personal information exchange (.pfx) file with `CLIMICROSOFT365_ENTRAAPPID` environment variable set. | ||
| Log in to Microsoft 365 using a PEM certificate by providing the application and tenant identifiers explicitly. | ||
|
|
||
| ```sh | ||
| m365 login --authType certificate --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --certificateFile /Users/user/dev/localhost.pem | ||
| ``` | ||
|
|
||
| Log in to Microsoft 365 using a personal information exchange (.pfx) file with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set. | ||
|
|
||
| ```sh | ||
| m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pfx --password 'pass@word1' | ||
| ``` | ||
|
|
||
| Log in to Microsoft 365 using a personal information exchange (.pfx) file protected with an empty password and `CLIMICROSOFT365_ENTRAAPPID` environment variable set. | ||
| Log in to Microsoft 365 using a personal information exchange (.pfx) file protected with an empty password with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set. | ||
|
|
||
| ```sh | ||
| m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pfx --password | ||
| ``` | ||
|
|
||
| Log in to Microsoft 365 using a personal information exchange (.pfx) file not protected with a password and `CLIMICROSOFT365_ENTRAAPPID` environment variable set. | ||
| Log in to Microsoft 365 using a personal information exchange (.pfx) file not protected with a password with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set. | ||
|
|
||
| ```sh | ||
| m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pfx | ||
| ``` | ||
|
|
||
| Log in to Microsoft 365 using a personal information exchange (.pfx) file. Use the specified thumbprint and `CLIMICROSOFT365_ENTRAAPPID` environment variable set. | ||
| Log in to Microsoft 365 using a personal information exchange (.pfx) file and a specific thumbprint with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set. | ||
|
|
||
| ```sh | ||
| m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pfx --thumbprint 47C4885736C624E90491F32B98855AA8A7562AF1 --password 'pass@word1' | ||
| ``` | ||
|
|
||
| Log in to Microsoft 365 using a certificate from a base64-encoded string with `CLIMICROSOFT365_ENTRAAPPID` environment variable set. | ||
| Log in to Microsoft 365 using a personal information exchange (.pfx) file by providing the application and tenant identifiers explicitly. | ||
|
|
||
| ```sh | ||
| m365 login --authType certificate --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --certificateFile /Users/user/dev/localhost.pfx --password 'pass@word1' | ||
| ``` | ||
|
|
||
| Log in to Microsoft 365 using a certificate from a base64-encoded string with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set. | ||
|
|
||
| ```sh | ||
| m365 login --authType certificate --certificateBase64Encoded MIII2QIBAzCCCJ8GCSqGSIb3DQEHAaCCCJAEg...eX1N5AgIIAA== --thumbprint D0C9B442DE249F55D10CDA1A2418952DC7D407A3 | ||
| ``` | ||
|
|
||
| Log in to Microsoft 365 using a certificate from a base64-encoded string by providing the application and tenant identifiers explicitly. | ||
|
|
||
| ```sh | ||
| m365 login --authType certificate --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --certificateBase64Encoded MIII2QIBAzCCCJ8GCSqGSIb3DQEHAaCCCJAEg...eX1N5AgIIAA== --thumbprint D0C9B442DE249F55D10CDA1A2418952DC7D407A3 | ||
| ``` | ||
|
|
||
| Log in to Microsoft 365 using a system assigned managed identity with `clientId` set in the configuration. Applies to Azure resources with managed identity enabled, such as Azure Virtual Machines, Azure App Service or Azure Functions. | ||
|
|
||
| ```sh | ||
|
|
@@ -196,12 +214,18 @@ Log in to Microsoft 365 using the interactive browser authentication with `clien | |
| m365 login --authType browser | ||
| ``` | ||
|
|
||
| Log in to Microsoft 365 using a client secret with `clientId` set in the configuration. | ||
| Log in to Microsoft 365 using a client secret with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set. | ||
|
|
||
| ```sh | ||
| m365 login --authType secret --secret topSeCr3t@007 | ||
| ``` | ||
|
|
||
| Log in to Microsoft 365 using a client secret by providing the application and tenant identifiers explicitly. | ||
|
|
||
| ```sh | ||
| m365 login --authType secret --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --secret topSeCr3t@007 | ||
| ``` | ||
|
|
||
| Ensures that the user is signed in, initiates the login flow if the user isn't signed in | ||
|
|
||
| ```sh | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.