我在 .net core (3.1) 中有一个 web api.
I' ve a web api in .net core (3.1).
这个网站被 3 个应用程序使用:
This web is used by 3 applications :
对于 Web 应用程序,我们使用默认登录页面.所以登录后会有一个重定向到客户端应用程序.
For the Web Application we use the default login page. so after login there is a redirect to the client application.
对于 Ios 和 Android 应用,我们无法找到可用于获取令牌的代码.
For Ios and Android Apps we are not able to find a code that worked in order to get the token.
谢谢.
关于如何获取 azure ad token 调用 api 的示例有很多.请看这里:https://docs.microsoft.com/en-us/azure/active-directory-b2c/code-samples
there are various samples of how to get azure ad tokens to call apis. please take a look here: https://docs.microsoft.com/en-us/azure/active-directory-b2c/code-samples
特别注意前2个:ios-swift-native-msal和android-native-msal他们基本上就是这样做的,使用 MSAL 库来获取令牌并允许您使用它来调用 Web api.
pay particular attention to the first 2: ios-swift-native-msal and android-native-msal they basically do exactly that, with the MSAL library to get tokens and allow you to use it to call web apis.
这篇关于如何将移动应用程序连接到 AD B2C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
ASP.NET Core 使用 Azure Active Directory 进行身份验证并ASP.NET Core authenticating with Azure Active Directory and persisting custom Claims across requests(ASP.NET Core 使用 Azure Active Directory 进行身
ASP.NET Core 2.0 Web API Azure Ad v2 令牌授权不起作用ASP.NET Core 2.0 Web API Azure Ad v2 Token Authorization not working(ASP.NET Core 2.0 Web API Azure Ad v2 令牌授权不起作用)
ASP Core Azure Active Directory 登录使用角色ASP Core Azure Active Directory Login use roles(ASP Core Azure Active Directory 登录使用角色)
如何获取守护进程或服务器到 C# ASP.NET Web API 的How do I get Azure AD OAuth2 Access Token and Refresh token for Daemon or Server to C# ASP.NET Web API(如何获取守护进程或服务器到 C# ASP.N
.Net Core 2.0 - 获取 AAD 访问令牌以与 Microsoft Graph.Net Core 2.0 - Get AAD access token to use with Microsoft Graph(.Net Core 2.0 - 获取 AAD 访问令牌以与 Microsoft Graph 一起使用)
异步调用时 Azure KeyVault Active Directory AcquireTokenAAzure KeyVault Active Directory AcquireTokenAsync timeout when called asynchronously(异步调用时 Azure KeyVault Active Directory AcquireTokenAsync 超