Skip to content

Add support for persisting credentials #46

@waldekmastykarz

Description

@waldekmastykarz

Currently, connection information is persisted in memory while running the CLI. In order for the CLI to support non-interactive mode in the future and be used for building scripts, the connection information must be persisted so that it can be used across the different commands, where each command runs in a separate process.

Azure CLI has implementation for cross-platform storage of credentials (https://github.com/Azure/azure-xplat-cli/blob/bea341b53149246fb61b95883aa34b72a7e980f2/lib/util/authentication/adalAuth.js#L32). We could reuse that code to implement storing credentials in the O365 CLI as well. Once we have that, we could adapt the CLI to run in non-immersive mode which can be used for building scripts.

  • implement persisting connection state on macOS
  • implement persisting connection state on Windows
  • implement persisting connection state on Linux
  • implement restoring connecting state when starting the CLI (both interactive and non-interactive)
  • fix broken tests
  • prove that new code is working
  • check that telemetry is being submitted in non-interactive mode
  • check that telemetry is not being submitted when running unit tests
  • add documentation pages about how persisting connection state works on the different OSes

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions