Skip to content

Commit 3cad567

Browse files
committed
remove references to MS365 CLI for auth
1 parent d31bb3c commit 3cad567

File tree

4 files changed

+10
-17
lines changed

4 files changed

+10
-17
lines changed

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010

1111
- Fix a bug in the `ms_plan$get_details()` method.
1212

13+
## Other
14+
15+
- Remove references to the Microsoft365 CLI, as this no longer has a multi-tenant app registration and hence cannot be used for authentication. This means you'll have to either allow the Microsoft365R app ID within your tenant or create your own app registration (both of which will require Azure admin access). (#215)
16+
17+
1318
# Microsoft365R 2.4.0
1419

1520
## OneDrive/SharePoint

R/Microsoft365R.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ utils::globalVariables(c("self", "private"))
9898
# default app ID
9999
.microsoft365r_app_id <- "d44a05d5-c6a5-4bbb-82d2-443123722380"
100100

101+
## no longer supported as of Sep 2024
101102
# CLI for Microsoft 365 app ID
102-
.cli_microsoft365_app_id <- "31359c7f-bd7e-475c-86db-fdb8c937548e"
103+
## .cli_microsoft365_app_id <- "31359c7f-bd7e-475c-86db-fdb8c937548e"
103104

104105
# helper functions
105106
error_message <- get("error_message", getNamespace("AzureGraph"))

R/client.R

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,7 @@ do_login <- function(tenant, app, scopes, token, ...)
276276
choose_app <- function(app)
277277
{
278278
if(is.null(app) || app == "")
279-
{
280-
if(!is.null(getOption("microsoft365r_use_cli_app_id")))
281-
.cli_microsoft365_app_id
282-
else .microsoft365r_app_id
283-
}
279+
.microsoft365r_app_id
284280
else app
285281
}
286282

vignettes/auth.Rmd

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,13 @@ See the vignettes "Using Microsoft365R in a Shiny app" and "Using Microsoft365R
7171

7272
### Using other app registrations: last-resort workarounds
7373

74-
The above methods are the **recommended solutions** to dealing with access restrictions on Microsoft365R. If they are not feasible, it's possible to work around these issues by piggybacking on other apps:
75-
76-
- By setting the R option `microsoft365r_use_cli_app_id` to a non-NULL value, Microsoft365R will authenticate using the app ID for the CLI for Microsoft 365---effectively pretending to be the CLI itself. Technically this app still requires admin approval, but it is in widespread use and is maintained by Microsoft employees, and so may already be allowed in your organisation. The CLI supports most Microsoft 365 services, but not Outlook or personal OneDrive.
77-
78-
```r
79-
options(microsoft365r_use_cli_app_id=TRUE)
80-
get_team("My team")
81-
```
82-
83-
- You can authenticate using the Azure CLI's app ID: `04b07795-8ddb-461a-bbee-02f9e1bf7b46`. This is a first-party Microsoft app, and hence can be used in any tenant. It is not intended for use with Microsoft 365, so not all functionality may be supported; however it should be possible to access Teams and SharePoint sites (but not Outlook, personal OneDrive or OneDrive for Business).
74+
The above methods are the **recommended solutions** to dealing with access restrictions on Microsoft365R. If they are not feasible, it's possible to work around these issues by using the Azure CLI's app ID: `04b07795-8ddb-461a-bbee-02f9e1bf7b46`. This is a first-party Microsoft app, and hence can be used in any tenant. It is not intended for use with Microsoft 365, so not all functionality may be supported; however it should be possible to access Teams and SharePoint sites (but not Outlook, personal OneDrive or OneDrive for Business).
8475

8576
```r
8677
get_sharepoint_site("My site", app="04b07795-8ddb-461a-bbee-02f9e1bf7b46")
8778
```
8879

89-
Be warned that these workarounds may draw the attention of your admin!
80+
Be warned that this may draw the attention of your admin!
9081

9182

9283
## Authenticating with a token

0 commit comments

Comments
 (0)