Failed to obtain Azure Active Directory token
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- azure, r
- Domain
- authentication, cloud
Research direction
Start by reviewing the get_business_onedrive() and list_shared_items() calls, then reproduce the scheduled Docker execution described in the issue. Compare it with the working local, production, and user-account runs, focusing on the token refresh context. Done means identifying the cause of the failed refresh and documenting a verified corrective change.
Written by the indexing model from the issue text.
Description
Hello,
I have weird problem with my token authentication in One Drive. I created R script which connects with list of xlsx in one shared folder in One Drive. This script is used in R shiny app and as CRON to daily updating data from xlsx to SQL database. I am using token authentication:
one_drive_connection <- get_business_onedrive()
folder <- one_drive_connection$list_shared_items() %>%
filter(name == '{FOLDER_NAME}') %>%
pull(remoteItem) %>%
.[[1]]
Script and token authorization is now working when:
- I activate script locally;
- I activate script in application on production server;
- cron for this script is working on my user account.
It also worked to August 5th as cron in Dockerfile on another user account. But suddenly it stopped working and I am not sure why. The error is:
Loading Microsoft Graph login for default tenant
Access token has expired or is no longer valid; refreshing
Error in process_aad_response(res) :
Bad Request (HTTP 400). Failed to obtain Azure Active Directory token. Message:
AADSTS700082: The refresh token has expired due to inactivity. The token was issued on 2023-05-08T12:00:02.9934064Z and was inactive for 90.00:00:00.
Trace ID: d3e47bfc-9a5c-4754-8e99-c6e4bc033a00
Correlation ID: 7b2c4130-f9af-4056-b3ae-4ed3b330feb5
Timestamp: 2023-08-10 01:15:06Z.
Error: Unable to refresh token
Execution halted
I know that in the message there is something about 'token expired' and 'inactivity', but the same token is working in another case (everywhere I used my token, the same). So I think that it's not due to token. Maybe is it due to using this cron in dockerfile? But I created new dockerfile and there is the same problem. Dockerfile was working from the beginning of June 2023.
Is there anybody who can help?
- Dominant language
- R
- Stars
- 48
- Forks
- 23
- Avg merge
- 4h 2m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/AzureAuth
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 20/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
robjhyndman/forecast#1220 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
JamesHWade/deputy#192 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug triage_needed
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pharmaverse/rtables#1123 · 1 comment · 1 reaction ·