问题描述
我正在使用此代码通过azure adb2c进行身份验证并获取访问令牌.我正在使用'react-azure-adb2c'msal库.我也尝试使用( https://login.microsoftonline.com/tfp/)实例值
I'm using this code to authenticate and to get access token using azure adb2c. And i'm using 'react-azure-adb2c' msal library.i tried using (https://login.microsoftonline.com/tfp/) instance value as well.
import b2cauth from 'react-azure-adb2c';
b2cauth.initialize({
instance: 'https://MyPortaldemo.b2clogin.com/tfp/',
tenant: '4f7d3971-9a3b-4a58-9342-ab0ffc4b842a',
signInPolicy: 'B2C_1_signupsigninmydemoapp',
applicationId: 'ad8597bc-484b-495e-b968-ce91b60c4947',
cacheLocation: 'sessionStorage',
scopes: ['https://MyPortaldemo.onmicrosoft.com/apireact/user_impersonation','openid'],
//redirectUri: 'http://localhost:3000',
postLogoutRedirectUri: window.location.origin,
});
b2cauth.run(() => {
ReactDOM.render(<App />, document.getElementById('root'));
serviceWorker.unregister();
});
and i'm getting this error
推荐答案
将您的评论概括为答案,以帮助遇到相同问题的其他人.
Summarize your comment as answer to help others who have the same problem.
login.microsoftonline.com 的弃用于2020年12月4日对所有Azure AD B2C租户生效,向现有租户提供一年的迁移时间以迁移到b2clogin.com
. 2019年12月4日之后创建的新租户将不接受来自 login.microsoftonline.com
的请求.所有功能在 b2clogin.com
终结点上均保持不变
The deprecation of login.microsoftonline.com
goes into effect for all Azure AD B2C tenants on 04 December 2020, providing existing tenants one year to migrate to b2clogin.com
. New tenants created after 04 December 2019 will not accept requests from login.microsoftonline.com
. All functionality remains the same on the b2clogin.com
endpoint.
有关更多详细信息,您可以参考有关将应用程序和API迁移到b2clogin.com .
For more details, you could refer to this article about migrating applications and apis to b2clogin.com.
这篇关于使用react-azure-adb2c库时在React中收到'UnsupportedAuthorityValidation'错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!