我正在遵循本指南 https://github.com/Azure-Samples/active-directory-xamarin-native-v2/tree/master/1-Basic
并将此代码放在我的 app.xaml.cs 中
public App()
{
PCA = PublicClientApplicationBuilder.Create(applicationClientId)
.WithTenantId("tenantidhere")
.WithRedirectUri($"msal{applicationClientId}://auth")
.WithIosKeychainSecurityGroup("com.microsoft.adalcache") // focussing on android first so ignore this one
.Build();
//...
}
我收到消息说返回网址有问题...并且继续按钮似乎不起作用。我不知道这些问题是相关的还是独立的。
以下是我在 azure AD 中的 azure 设置: 我觉得我必须切换回“旧体验”,因为指南/教程等似乎没有反射(reflect)当前的 Azure UI。
最佳答案
您将使用应用程序对应的 clientId 更新 MsalActivity.cs
和 AndroidManifest.xml
上的 DataScheme 值。
关于azure - MSAL.Net 和 Xamarin.Forms 存在重定向 url 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60820233/