You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/msal-browser/FAQ.md
-39Lines changed: 0 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -253,45 +253,6 @@ You can read more about this behavior [here](https://docs.microsoft.com/azure/ac
253
253
254
254
MSAL.js will only process tokens which it originally requested. If your flow requires that you send a user a link they can use to sign up, you will need to ensure that the link points to your app, not the B2C service directly. An example flow can be seen in the [working with B2C](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/working-with-b2c.md) doc.
255
255
256
-
## Why is there no access token returned from `acquireTokenSilent`?
257
-
258
-
Azure AD B2C currently requires refresh tokens to be redeemed with the same scopes that were requested when the refresh token is first obtained. If your application requires different behavior, workarounds include:
259
-
260
-
#### If your application only needs to support 1 set of scopes:
261
-
262
-
Please ensure that these scopes are requested as part of the `loginPopup`,`loginRedirect` or `ssoSilent` call made prior to calling `acquireTokenSilent`. This ensures the refresh token is issued for the scopes you need.
263
-
264
-
#### If your application needs to support more than 1 set of scopes:
265
-
266
-
Include the first set of scopes in `loginPopup`, `loginRedirect` or `ssoSilent` then make another call to `acquireTokenRedirect`, `acquireTokenPopup` or `ssoSilent` containing your 2nd set of scopes. Until the access tokens expire, `acquireTokenSilent` will return either token from the cache. Once an access token is expired, one of the interactive APIs will need to be called again. This is an example of how you can handle this scenario:
267
-
268
-
```javascript
269
-
// Initial acquisition of scopes 1 and 2
270
-
awaitmsal.loginPopup({scopes: ["scope1"]});
271
-
constaccount=msal.getAllAccounts()[0];
272
-
awaitmsal.ssoSilent({
273
-
scopes: ["scope2"],
274
-
loginHint:account.username
275
-
});
276
-
277
-
// Subsequent token acquisition with fallback
278
-
msal.acquireTokenSilent({
279
-
scopes: ["scope1"],
280
-
account: account
281
-
}).then((response) => {
282
-
if (!response.accessToken) {
283
-
returnmsal.ssoSilent({
284
-
scopes: ["scope1"],
285
-
loginHint:account.username
286
-
});
287
-
} else {
288
-
return response;
289
-
}
290
-
});
291
-
```
292
-
293
-
:warning:`ssoSilent` will not work in browsers that disable 3rd party cookies, such as Safari. If you need to support these browsers, call `acquireTokenRedirect` or `acquireTokenPopup`
294
-
295
256
## What should I do if I believe my issue is with the B2C service itself rather than with the library
296
257
297
258
In that case, please file a support ticket with the B2C team by following the instructions here: [B2C support options](https://docs.microsoft.com/azure/active-directory-b2c/support-options).
Copy file name to clipboardExpand all lines: lib/msal-browser/docs/working-with-b2c.md
-2Lines changed: 0 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -111,8 +111,6 @@ msal.loginRedirect({
111
111
112
112
Read more [here](https://docs.microsoft.com/en-us/azure/active-directory-b2c/authorization-code-flow#2-get-an-access-token)
113
113
114
-
Note: Currently there is a known issue where the B2C service responds with the scope "/" which prevents MSAL caching from working properly when requesting clientId as a scope. Currently option 2 is the recommended approach to ensure caching works. Track issue [#2451](#2451) for a resolution to this issue.
115
-
116
114
2. Expose your own custom scope on your app registration and request this scope:
0 commit comments