Skip to content

Commit

Permalink
Update scripted.Rmd (#213)
Browse files Browse the repository at this point in the history
The current Microsoft Graph API requires a client_secret to be passed along when an app id is being referenced for a resource_owner auth flow.
  • Loading branch information
jrausch12 authored Feb 6, 2025
1 parent 57a9a88 commit cde984a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vignettes/scripted.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ tenant <- "your-tenant-here"

# the application/client ID of the app registration to use
app <- "your-app-id-here"
app_secret <- "your-app-secret-here"

# get the service account username and password
user <- Sys.getenv("EXAMPLE_MS365R_SERVICE_USER")
Expand All @@ -144,7 +145,7 @@ target_drive <- Sys.getenv("EXAMPLE_MS365R_TARGET_DRIVE")
target_path <- Sys.getenv("EXAMPLE_MS365R_TARGET_PATH")

drv <- get_business_onedrive(tenant=tenant, app=app, username=user, password=pwd,
auth_type="resource_owner")
token_args = list(client_secret = app_secret), auth_type="resource_owner")

# search for the desired item in the list of shared items
shared <- drv$list_shared_files(info="items")
Expand Down

0 comments on commit cde984a

Please sign in to comment.