Skip to content

Simplify login in the CLI #889

@waldekmastykarz

Description

@waldekmastykarz

We should simplify logging in to Office 365 so that there is only one login command. Instead of having to login to each API separately (eg. spo login, graph login, azmgmt login) you would login once in the CLI and then each command would use the Multi-Resource Refresh Token to obtain access token it needs. Internally all retrieved tokens would be stored the same way they are being stored now so that there is minimal overhead in executing commands and once retrieved tokens can be reused until they expire. Retrieving SharePoint URL requires additional consideration because each tenant has a unique URL as opposite to services such as Microsoft Graph or Azure AD Graph.

This change makes it easier to work with the CLI because it doesn't require users to sign in separately to each command.

This is a breaking change which will be included in v2 of the CLI.

  • implement o365-wide login, logout and status commands
  • centralize persisting login information
  • fix lazy loading of commands
  • automatically retrieve access token necessary for the particular HTTP request
  • update all commands
  • update command help and docs
  • update docs about using custom AAD apps and that at minimum it has to have permissions to read SharePoint sites or SPO URL discovery will fail and SPO commands won't work
  • update user manual
  • update MPA (if necessary)
  • update PR checklist

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions