Skip to content

Commit a884f50

Browse files
committed
tidy up MS365 CLI appid removal
1 parent 7b6aade commit a884f50

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

R/client.R

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,11 @@ do_login <- function(tenant, app, scopes, token, ...)
276276
choose_app <- function(app)
277277
{
278278
if(is.null(app) || app == "")
279-
.microsoft365r_app_id
279+
{
280+
if(!is.null(getOption("microsoft365r_use_cli_app_id")))
281+
stop("Using the Microsoft 365 CLI is no longer supported; please register Microsoft365R as an app in your directory", call.=FALSE)
282+
else .microsoft365r_app_id
283+
}
280284
else app
281285
}
282286

@@ -292,7 +296,7 @@ assert_one_arg <- function(..., msg=NULL)
292296

293297
set_default_scopes <- function(scopes, app)
294298
{
295-
if(app %in% c(.cli_microsoft365_app_id, get(".az_cli_app_id", getNamespace("AzureGraph"))))
299+
if(app == get(".az_cli_app_id", getNamespace("AzureGraph")))
296300
scopes <- ".default"
297301
scopes
298302
}

0 commit comments

Comments
 (0)