Skip to content

Bug report: //_api/web when calling spo web get on root URL #6618

@waldekmastykarz

Description

@waldekmastykarz

Priority

(Low) Something is a little off

Description

When you call spo web get -u / it leads to an API call like https://contoso.sharepoint.com//_api/web. While it works, it might cause issues in the future, for example, when we try to detect minimal permissions.

Steps to reproduce

m365 spo web get -u /

Expected results

Calling API at https://contoso.sharepoint.com/_api/web

Actual results

Calling API at https://contoso.sharepoint.com//_api/web

Diagnostics

No response

CLI for Microsoft 365 version

latest from main

nodejs version

22

Operating system (environment)

macOS

Shell

zsh

cli doctor

No response

Additional Info

We should trim end / on the URL specified by the user at

let url: string = `${args.options.url}/_api/web`;

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions