MSAL SignUp 不返回本地帐户的访问令牌

MSAL SignUp not returning access token for local accounts

我已按照教程代码 link在此处进行操作: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/data-cloud/authentication/azure-ad-b2c

但是在注册时(上面 link 没有详细介绍),AuthenticationResult returns 为 null access_token。是否有我遗漏的 b2C 设置?

您需要代表一个资源来获取使用应用注册的访问令牌 https://docs.microsoft.com/en-us/azure/active-directory-b2c/tutorial-desktop-app-webapi?tabs=app-reg-ga

您需要在 MSAL 代码中请求范围以获取特定资源的访问令牌: https://github.com/Azure-Samples/active-directory-b2c-xamarin-native/blob/master/README.md