Skip to content

Commit 23c2ed5

Browse files
authored
Adjust API docs based on off-line feedback
1 parent aeb11dd commit 23c2ed5

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

msal/application.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -431,11 +431,14 @@ def acquire_token_silent(
431431
**kwargs):
432432
"""Acquire an access token for given account, without user interaction.
433433
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
436439
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.
439442
440443
Internally, this method calls :func:`~acquire_token_silent_with_error`.
441444
@@ -462,8 +465,10 @@ def acquire_token_silent_with_error(
462465
or by finding a valid refresh token from cache and then automatically
463466
use it to redeem a new access token.
464467
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.
467472
468473
:param list[str] scopes: (Required)
469474
Scopes requested to access a protected API (a resource).

0 commit comments

Comments
 (0)