azure-active-directory

MSAL for Android fails performing B2C login

那年仲夏 提交于 2021-02-07 12:16:32
问题 I'm using 0.2.2 version of Microsoft Authentication Library (MSAL) Preview for Android library to perform Azure AD B2C login in my native Android app. The library opens the browser to start login process. Afterwards I log in successfully and it navigates me back to the app. Inside AuthenticationCallback , I get the following error: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference at com.microsoft.identity

MSAL for Android fails performing B2C login

会有一股神秘感。 提交于 2021-02-07 12:15:22
问题 I'm using 0.2.2 version of Microsoft Authentication Library (MSAL) Preview for Android library to perform Azure AD B2C login in my native Android app. The library opens the browser to start login process. Afterwards I log in successfully and it navigates me back to the app. Inside AuthenticationCallback , I get the following error: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference at com.microsoft.identity

Azure AD as an “external provider”?

为君一笑 提交于 2021-02-07 08:39:46
问题 I'm trying to build a simple ASP.Net Core 2.2 web app that allows AzureAD as an "external provider". I'm doing this in Visual Studio 2019. As a super-simple demo project, I started by creating a new project that uses Azure AD as the login provider: Select ASP.NET Core Web Application Select Web Application (Model-View-Controller) Change Authentication to "Work or School Accounts". It automatically filled in my domain name (because I'm logged in to VS) This creates a web application set up to

Azure AD as an “external provider”?

我只是一个虾纸丫 提交于 2021-02-07 08:39:27
问题 I'm trying to build a simple ASP.Net Core 2.2 web app that allows AzureAD as an "external provider". I'm doing this in Visual Studio 2019. As a super-simple demo project, I started by creating a new project that uses Azure AD as the login provider: Select ASP.NET Core Web Application Select Web Application (Model-View-Controller) Change Authentication to "Work or School Accounts". It automatically filled in my domain name (because I'm logged in to VS) This creates a web application set up to

Azure Active Directory Logout with ADAL library

僤鯓⒐⒋嵵緔 提交于 2021-02-07 06:21:31
问题 I used the my Azure Active Directory to protect my web API and I create a native application in the Azure management portal. This native application is basically a MVC web application and I use the ADAL library to get the token and call the api with that token. The code I used to get the token is shown below: AuthenticationContext ac = new AuthenticationContext(authority); AuthenticationResult ar = ac.AcquireToken(resourceID, clientID, redirectURI); string accessToken = ar.AccessToken; Now I

post_logout_redirect_uri ASP NET Core 2.2 AzureAD Razor Class Library RCL

瘦欲@ 提交于 2021-02-07 04:37:36
问题 We have tried using the sample https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/ Walked through the sample and all works. We can't get it to redirect after logout process. Also, it seems the account controller is not there but it is called in _layout.chtml this must be something new. 回答1: Yes, it does redirect to the application - what I'd like it to do is redirect to a different page. You can redirect user to another page after sign-out by setting the

How do I get Azure AD OAuth2 Access Token and Refresh token for Daemon or Server to C# ASP.NET Web API

為{幸葍}努か 提交于 2021-02-07 03:59:08
问题 I have implemented an Azure AD OAuth2 Daemon or Server to ASP.NET Web API. However I only receive an access token which is the property on the AuthenticationResult. See implementation below. public IHttpActionResult GetAccessToken(string clientId, string clientkey) { AuthenticationContext authContext = new AuthenticationContext(authority); ClientCredential clientCredential = new ClientCredential(clientId, clientkey); AuthenticationResult authenticationResult = authContext.AcquireTokenAsync

How do I get Azure AD OAuth2 Access Token and Refresh token for Daemon or Server to C# ASP.NET Web API

五迷三道 提交于 2021-02-07 03:57:32
问题 I have implemented an Azure AD OAuth2 Daemon or Server to ASP.NET Web API. However I only receive an access token which is the property on the AuthenticationResult. See implementation below. public IHttpActionResult GetAccessToken(string clientId, string clientkey) { AuthenticationContext authContext = new AuthenticationContext(authority); ClientCredential clientCredential = new ClientCredential(clientId, clientkey); AuthenticationResult authenticationResult = authContext.AcquireTokenAsync

How do I get Azure AD OAuth2 Access Token and Refresh token for Daemon or Server to C# ASP.NET Web API

前提是你 提交于 2021-02-07 03:57:22
问题 I have implemented an Azure AD OAuth2 Daemon or Server to ASP.NET Web API. However I only receive an access token which is the property on the AuthenticationResult. See implementation below. public IHttpActionResult GetAccessToken(string clientId, string clientkey) { AuthenticationContext authContext = new AuthenticationContext(authority); ClientCredential clientCredential = new ClientCredential(clientId, clientkey); AuthenticationResult authenticationResult = authContext.AcquireTokenAsync

How to make Azure AD access_token compliant for its signature validation outside Microsoft Graph APIs?

别来无恙 提交于 2021-02-05 10:25:07
问题 I have created a Azure AD Mobile and desktop applications. Now I am getting my access_token using following API, POST https://login.microsoftonline.com/{Directory (tenant) ID }/oauth2/token password:pass client_id:id resource:https://graph.microsoft.com grant_type:password client_secret:secret username:userName scope: openid The response looks like, "access_token": "acessToken", "refresh_token": "refereshToken", "id_token": "id_token". Now I am passing the access_token to a third party