adal.js

access_token same as id_token when trying to acquire access token with ADAL.js AuthenticationContext?

别说谁变了你拦得住时间么 提交于 2020-01-03 08:37:13
问题 I am authenticating my Single Page App (Angular4) with Azure AD, and using Adal.js for the same. On the login page, I click a button that redirects to Microsoft AAD and upon successful login it redirects back to application home page, and receives id_token and user info from JWT. I need the access_token for back-end API access, which I am trying to acquire through the the ADAL AuthenticationContext 's getCachedToken() method, and sending the clientId as parameter: this.context.getCachedToken

Angular 2 SPA Azure Active Directory JWT Issue

偶尔善良 提交于 2020-01-02 07:09:53
问题 Wondering if any Azure Active Directory/Angular 2/Adal experts can assist with this. My set up is as follows: Azure Active Directory with three app registrations. One for the Web API, one for a WPF application and one for an Angular 2 Application. The configuration for the Web API looks fairly standard: <add key="ida:Tenant" value="<tenant>" /> <add key="ida:Audience" value="<ResourceURI>" /> The configuration for the WPF application (which is working) is <add key="ida:AADInstance" value=

Request access token with id_token, ADFS 2016 and react-adal

ⅰ亾dé卋堺 提交于 2019-12-31 05:20:09
问题 I've got a client side app which I'm authenticating with ADFS and react-adal and I've got most of it working but can't seem to find a way to request the access token (and therefore refresh token) with the id_token which is all I get in return from ADFS. At the moment the React app forwards the user to ADFS to sign in, this then authenticates the token and I want to be able to get the userinfo (Name, Surname, roles etc...) from the /adfs/userinfo endpoint but need the bearer token to do so.

Combining ADAL.Net and ADAL.js

£可爱£侵袭症+ 提交于 2019-12-25 07:52:28
问题 I have a legacy application that was written using web forms. In this project we started to convert some of the webforms to SPA, angular.js, and WebAPI. The SPA pages communicate directly with the WebAPI. The idea is that eventually, all of the webforms will be converted to the new technology. For the SPA pages, I've implemented adal.js and for the webforms I'm using ADAL.net. Both are obviously using Azure Active Directory. However, they don't seem to be using the same bearer token, because

Redirection issue with URL parameter with ADAL.js and UI-Router

岁酱吖の 提交于 2019-12-25 04:35:25
问题 I configured the state which contains url with url parameters like this: url:route/:id1/:id2:id3 with ADAL js. When I hit url with route/1/2/3 , after login, I am redirected to route/:id1/:id2/:id3?id1=1&id2=2&id3=3 instead of route/1/2/3 . I investigated further and in adal-angular.js file, we are setting browser url with $location.url().search(jsonParameters) where jsonParameters is json object with value {id1:1, id2:2, id3:3} which is causing the url malformation. Can you guys point me in

200 ok response from power bi rest api but no json

删除回忆录丶 提交于 2019-12-25 01:53:02
问题 I am trying to call power bi rest api using adal.js. Token is working fine for authorization, response also coming 200 ok but no result is showing. Here is my code I am using and the url trying to access: https://api.powerbi.com/v1.0/myorg/groups/{groupid}/reports/{reportid} var headers = new Headers(); var bearer = "Bearer " + token; headers.append("Authorization", bearer); headers.append("Content-Type", "application/json"); headers.append("Accept", "None"); var options = { method: "GET",

Redirect URI issue with URL parameter with ADAL.js

怎甘沉沦 提交于 2019-12-24 18:33:08
问题 We have an AngularJS 1.x and using ADAL.js. Unable to redirect to URL with parameters after authentication.Our reirect URL is http://domainname/register/step-1/recordid/username First issue is that we are unable to configure such a Redirect URL in Azure. We have also tried using the solution outlined in Redirection issue with URL parameter with ADAL.js and UI-Router But we keep on getting the error "the reply url specified in the request does not match the reply urls configured for the

MS Dynamics : Generate Refresh Token for OAuth

北战南征 提交于 2019-12-24 17:43:30
问题 I am using OData api of MS Dynamics. Here we are doing authentication using oauth I am taking reference from Ref : https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/developer-guide?view=dynamics-ce-odata-9 https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/connect-customer-engagement-web-services-using-oauth I am using Web Api so we followed below reference. https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/oauth-cross

Getting a valid bearer token for an app from a an angular AD client

自古美人都是妖i 提交于 2019-12-24 15:05:12
问题 I have followed this guide: https://github.com/Azure-Samples/active-directory-angularjs-singlepageapp and I connect successfully. I would like to send the bearer token to my C# server and use it to call my workbench(another AD app) functions. I am trying to use the bearer token I get from angular in a postman call and it is unauthorized. It is important to mention that I gave my angular client on AD permission to access my workbench instance and it's still not working, that leads me to some

AAD token: Why aud sometimes shows app id, sometimes it's the app url?

可紊 提交于 2019-12-24 01:56:15
问题 I'm using adal.js for my website for AAD authentication. After decode the AAD token, the aud looks differently, it's the app api in AAD. However, when I try to understand how AAD works in different scenarios, almost all the documentation's example of AAD token shows aud as the resource url, like http://contoso.com/. Based on my understanding, aud means this token is issued for. There's no restriction to what it should actually be. But I'm curious what's the main reason of this inconsistent