@@ -431,11 +431,14 @@ def acquire_token_silent(
431
431
** kwargs ):
432
432
"""Acquire an access token for given account, without user interaction.
433
433
434
- It behaves same as :func:`~acquire_token_silent_with_error`,
435
- except that this method will combine the cache empty and refresh error
434
+ It is done either by finding a valid access token from cache,
435
+ or by finding a valid refresh token from cache and then automatically
436
+ use it to redeem a new access token.
437
+
438
+ This method will combine the cache empty and refresh error
436
439
into one return value, `None`.
437
- If your app does not need to care the exact token refresh error during
438
- token cache look-up, then this method is easier to use .
440
+ If your app does not care about the exact token refresh error during
441
+ token cache look-up, then this method is easier and recommended .
439
442
440
443
Internally, this method calls :func:`~acquire_token_silent_with_error`.
441
444
@@ -462,8 +465,10 @@ def acquire_token_silent_with_error(
462
465
or by finding a valid refresh token from cache and then automatically
463
466
use it to redeem a new access token.
464
467
465
- Unlike :func:`~acquire_token_silent`,
466
- error happened during token refresh would also be returned.
468
+ This method will differentiate cache empty from token refresh error.
469
+ If your app cares the exact token refresh error during
470
+ token cache look-up, then this method is suitable.
471
+ Otherwise, the other method :func:`~acquire_token_silent` is recommended.
467
472
468
473
:param list[str] scopes: (Required)
469
474
Scopes requested to access a protected API (a resource).
0 commit comments