Get refresh token of azure AD using adal angular
I am using "adal-angular6": "1.0.68" version.
Here is my configuration ::
private config = {
tenant: environment.appId, // tenantId.
clientId: environment.clientId,
redirectUri: environment.origin + '/auth-callback', // callback URI.
postLogoutRedirectUri: environment.origin,
cacheLocation: 'localStorage',
};
I am not getting refresh token when I call adalService.acquireToken('https://graph.microsoft.com')
. Am I mising some configuration ?
angular azure-active-directory azure-ad-graph-api
add a comment |
I am using "adal-angular6": "1.0.68" version.
Here is my configuration ::
private config = {
tenant: environment.appId, // tenantId.
clientId: environment.clientId,
redirectUri: environment.origin + '/auth-callback', // callback URI.
postLogoutRedirectUri: environment.origin,
cacheLocation: 'localStorage',
};
I am not getting refresh token when I call adalService.acquireToken('https://graph.microsoft.com')
. Am I mising some configuration ?
angular azure-active-directory azure-ad-graph-api
Well to be honest, I am usingadal-angular
from AzureAD not the wrappersadal-angular4
oradal-angular6
- and in my case, it just works. The argument toacquireToken
is not the same as in your code tho, it is theauthContext
object.
– Aviad P.
Nov 13 '18 at 15:46
@AviadP.it will be good if you can share example. How to get authContext ?
– Sandip
Nov 13 '18 at 15:51
add a comment |
I am using "adal-angular6": "1.0.68" version.
Here is my configuration ::
private config = {
tenant: environment.appId, // tenantId.
clientId: environment.clientId,
redirectUri: environment.origin + '/auth-callback', // callback URI.
postLogoutRedirectUri: environment.origin,
cacheLocation: 'localStorage',
};
I am not getting refresh token when I call adalService.acquireToken('https://graph.microsoft.com')
. Am I mising some configuration ?
angular azure-active-directory azure-ad-graph-api
I am using "adal-angular6": "1.0.68" version.
Here is my configuration ::
private config = {
tenant: environment.appId, // tenantId.
clientId: environment.clientId,
redirectUri: environment.origin + '/auth-callback', // callback URI.
postLogoutRedirectUri: environment.origin,
cacheLocation: 'localStorage',
};
I am not getting refresh token when I call adalService.acquireToken('https://graph.microsoft.com')
. Am I mising some configuration ?
angular azure-active-directory azure-ad-graph-api
angular azure-active-directory azure-ad-graph-api
asked Nov 13 '18 at 14:14
SandipSandip
115
115
Well to be honest, I am usingadal-angular
from AzureAD not the wrappersadal-angular4
oradal-angular6
- and in my case, it just works. The argument toacquireToken
is not the same as in your code tho, it is theauthContext
object.
– Aviad P.
Nov 13 '18 at 15:46
@AviadP.it will be good if you can share example. How to get authContext ?
– Sandip
Nov 13 '18 at 15:51
add a comment |
Well to be honest, I am usingadal-angular
from AzureAD not the wrappersadal-angular4
oradal-angular6
- and in my case, it just works. The argument toacquireToken
is not the same as in your code tho, it is theauthContext
object.
– Aviad P.
Nov 13 '18 at 15:46
@AviadP.it will be good if you can share example. How to get authContext ?
– Sandip
Nov 13 '18 at 15:51
Well to be honest, I am using
adal-angular
from AzureAD not the wrappers adal-angular4
or adal-angular6
- and in my case, it just works. The argument to acquireToken
is not the same as in your code tho, it is the authContext
object.– Aviad P.
Nov 13 '18 at 15:46
Well to be honest, I am using
adal-angular
from AzureAD not the wrappers adal-angular4
or adal-angular6
- and in my case, it just works. The argument to acquireToken
is not the same as in your code tho, it is the authContext
object.– Aviad P.
Nov 13 '18 at 15:46
@AviadP.it will be good if you can share example. How to get authContext ?
– Sandip
Nov 13 '18 at 15:51
@AviadP.it will be good if you can share example. How to get authContext ?
– Sandip
Nov 13 '18 at 15:51
add a comment |
2 Answers
2
active
oldest
votes
No, you cannot get refresh tokens in the front-end.
You need a client secret to exchange refresh tokens for new access tokens, and you can't put a secret in front-end Javascript code, as it is visible to everyone.
I don't think this applies, the client can definitely get a refresh token. I am using it in my own app. Trying to draft a reply to this question as we speak...
– Aviad P.
Nov 13 '18 at 14:47
Hmm, are you thinking through usage of authorization code grant? I'd be glad to be proved wrong :)
– juunas
Nov 13 '18 at 14:59
I'm not 100% fluent in the terminology, but the adal library says to perform anacquireToken
call before each call, this will take care of the refresh automatically if it is needed.
– Aviad P.
Nov 13 '18 at 15:07
Yes, but not via a refresh token
– juunas
Nov 13 '18 at 15:08
Thanks @AviadP. I am using angular6 as front-end framework. It will be good if you can share with example
– Sandip
Nov 13 '18 at 15:17
|
show 1 more comment
I will try to give my code which works, but which doesn't use the wrapper adal-angular6
but rather the official adal-angular
from AzureAD.
This is my angular.json
part which loads the library:
{
...
"projects": {
"my-app": {
...
"architect": {
"build": {
...
"options": {
...
"scripts": [
"node_modules/adal-angular/dist/adal.min.js"
]
This is the part of my authentication service that initializes the library:
declare var AuthenticationContext;
@Injectable(...)
export class AuthService {
adalConfig = {
tenant: '*******.com',
clientId: '12345678-9abc-def0-1234-56789abcdef0',
redirectUri: environment.redirectPath,
postLogoutRedirectUri: environment.redirectPath,
cacheLocation: 'localStorage',
};
authContext;
constructor(http: HttpClient) {
this.authContext = new AuthenticationContext(this.adalConfig);
}
acquireToken(): Observable<string> {
const func: (a: string, c: (error, token: string) => void) => void = (a, c) => {
(this.authContext.acquireToken.bind(this.authContext))(a, c);
};
const bound = bindCallback(func);
return bound(this.authContext.config.clientId).pipe(map(([e, r]) => r));
}
...
}
And this is what is happening in my interceptor before every Ajax call:
@Injectable()
export class TokenInterceptor implements HttpInterceptor {
constructor(auth: AuthService, route: Router) { }
intercept(request: HttpRequest<any>, next: HttpHandler):
Observable<HttpSentEvent
| HttpHeaderResponse
| HttpProgressEvent
| HttpResponse<any>
| HttpUserEvent<any>> {
const tokenGetter = this.auth.acquireToken();
const rc = tokenGetter.pipe(
take(1),
switchMap(r => {
const req2 = r && request.clone({
setHeaders: {
Authorization: `Bearer ${r}`
}
}) || request;
return next.handle(req2).pipe(
tap(null, (err: HttpErrorResponse) => {
if (err.status === 401) {
... // handle auth errors, auth again, save url and remake call, etc...
}
}),
catchError((e, c) => { ... })
);
}));
return rc;
}
The only thing weird about the above is that the library's acquireToken
accepts a callback function and I am converting it into an observable by using rxjs
's bindCallback
but other than that, it simply works.
Notice that the acquireToken
method doesn't accept any arguments (contrary to what I said in the comment to the question).
I tried this solution but it is not returning refreshtoken before expiration of accesstoken
– Sandip
Nov 14 '18 at 9:44
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53282974%2fget-refresh-token-of-azure-ad-using-adal-angular%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
No, you cannot get refresh tokens in the front-end.
You need a client secret to exchange refresh tokens for new access tokens, and you can't put a secret in front-end Javascript code, as it is visible to everyone.
I don't think this applies, the client can definitely get a refresh token. I am using it in my own app. Trying to draft a reply to this question as we speak...
– Aviad P.
Nov 13 '18 at 14:47
Hmm, are you thinking through usage of authorization code grant? I'd be glad to be proved wrong :)
– juunas
Nov 13 '18 at 14:59
I'm not 100% fluent in the terminology, but the adal library says to perform anacquireToken
call before each call, this will take care of the refresh automatically if it is needed.
– Aviad P.
Nov 13 '18 at 15:07
Yes, but not via a refresh token
– juunas
Nov 13 '18 at 15:08
Thanks @AviadP. I am using angular6 as front-end framework. It will be good if you can share with example
– Sandip
Nov 13 '18 at 15:17
|
show 1 more comment
No, you cannot get refresh tokens in the front-end.
You need a client secret to exchange refresh tokens for new access tokens, and you can't put a secret in front-end Javascript code, as it is visible to everyone.
I don't think this applies, the client can definitely get a refresh token. I am using it in my own app. Trying to draft a reply to this question as we speak...
– Aviad P.
Nov 13 '18 at 14:47
Hmm, are you thinking through usage of authorization code grant? I'd be glad to be proved wrong :)
– juunas
Nov 13 '18 at 14:59
I'm not 100% fluent in the terminology, but the adal library says to perform anacquireToken
call before each call, this will take care of the refresh automatically if it is needed.
– Aviad P.
Nov 13 '18 at 15:07
Yes, but not via a refresh token
– juunas
Nov 13 '18 at 15:08
Thanks @AviadP. I am using angular6 as front-end framework. It will be good if you can share with example
– Sandip
Nov 13 '18 at 15:17
|
show 1 more comment
No, you cannot get refresh tokens in the front-end.
You need a client secret to exchange refresh tokens for new access tokens, and you can't put a secret in front-end Javascript code, as it is visible to everyone.
No, you cannot get refresh tokens in the front-end.
You need a client secret to exchange refresh tokens for new access tokens, and you can't put a secret in front-end Javascript code, as it is visible to everyone.
answered Nov 13 '18 at 14:20
juunasjuunas
21.8k34880
21.8k34880
I don't think this applies, the client can definitely get a refresh token. I am using it in my own app. Trying to draft a reply to this question as we speak...
– Aviad P.
Nov 13 '18 at 14:47
Hmm, are you thinking through usage of authorization code grant? I'd be glad to be proved wrong :)
– juunas
Nov 13 '18 at 14:59
I'm not 100% fluent in the terminology, but the adal library says to perform anacquireToken
call before each call, this will take care of the refresh automatically if it is needed.
– Aviad P.
Nov 13 '18 at 15:07
Yes, but not via a refresh token
– juunas
Nov 13 '18 at 15:08
Thanks @AviadP. I am using angular6 as front-end framework. It will be good if you can share with example
– Sandip
Nov 13 '18 at 15:17
|
show 1 more comment
I don't think this applies, the client can definitely get a refresh token. I am using it in my own app. Trying to draft a reply to this question as we speak...
– Aviad P.
Nov 13 '18 at 14:47
Hmm, are you thinking through usage of authorization code grant? I'd be glad to be proved wrong :)
– juunas
Nov 13 '18 at 14:59
I'm not 100% fluent in the terminology, but the adal library says to perform anacquireToken
call before each call, this will take care of the refresh automatically if it is needed.
– Aviad P.
Nov 13 '18 at 15:07
Yes, but not via a refresh token
– juunas
Nov 13 '18 at 15:08
Thanks @AviadP. I am using angular6 as front-end framework. It will be good if you can share with example
– Sandip
Nov 13 '18 at 15:17
I don't think this applies, the client can definitely get a refresh token. I am using it in my own app. Trying to draft a reply to this question as we speak...
– Aviad P.
Nov 13 '18 at 14:47
I don't think this applies, the client can definitely get a refresh token. I am using it in my own app. Trying to draft a reply to this question as we speak...
– Aviad P.
Nov 13 '18 at 14:47
Hmm, are you thinking through usage of authorization code grant? I'd be glad to be proved wrong :)
– juunas
Nov 13 '18 at 14:59
Hmm, are you thinking through usage of authorization code grant? I'd be glad to be proved wrong :)
– juunas
Nov 13 '18 at 14:59
I'm not 100% fluent in the terminology, but the adal library says to perform an
acquireToken
call before each call, this will take care of the refresh automatically if it is needed.– Aviad P.
Nov 13 '18 at 15:07
I'm not 100% fluent in the terminology, but the adal library says to perform an
acquireToken
call before each call, this will take care of the refresh automatically if it is needed.– Aviad P.
Nov 13 '18 at 15:07
Yes, but not via a refresh token
– juunas
Nov 13 '18 at 15:08
Yes, but not via a refresh token
– juunas
Nov 13 '18 at 15:08
Thanks @AviadP. I am using angular6 as front-end framework. It will be good if you can share with example
– Sandip
Nov 13 '18 at 15:17
Thanks @AviadP. I am using angular6 as front-end framework. It will be good if you can share with example
– Sandip
Nov 13 '18 at 15:17
|
show 1 more comment
I will try to give my code which works, but which doesn't use the wrapper adal-angular6
but rather the official adal-angular
from AzureAD.
This is my angular.json
part which loads the library:
{
...
"projects": {
"my-app": {
...
"architect": {
"build": {
...
"options": {
...
"scripts": [
"node_modules/adal-angular/dist/adal.min.js"
]
This is the part of my authentication service that initializes the library:
declare var AuthenticationContext;
@Injectable(...)
export class AuthService {
adalConfig = {
tenant: '*******.com',
clientId: '12345678-9abc-def0-1234-56789abcdef0',
redirectUri: environment.redirectPath,
postLogoutRedirectUri: environment.redirectPath,
cacheLocation: 'localStorage',
};
authContext;
constructor(http: HttpClient) {
this.authContext = new AuthenticationContext(this.adalConfig);
}
acquireToken(): Observable<string> {
const func: (a: string, c: (error, token: string) => void) => void = (a, c) => {
(this.authContext.acquireToken.bind(this.authContext))(a, c);
};
const bound = bindCallback(func);
return bound(this.authContext.config.clientId).pipe(map(([e, r]) => r));
}
...
}
And this is what is happening in my interceptor before every Ajax call:
@Injectable()
export class TokenInterceptor implements HttpInterceptor {
constructor(auth: AuthService, route: Router) { }
intercept(request: HttpRequest<any>, next: HttpHandler):
Observable<HttpSentEvent
| HttpHeaderResponse
| HttpProgressEvent
| HttpResponse<any>
| HttpUserEvent<any>> {
const tokenGetter = this.auth.acquireToken();
const rc = tokenGetter.pipe(
take(1),
switchMap(r => {
const req2 = r && request.clone({
setHeaders: {
Authorization: `Bearer ${r}`
}
}) || request;
return next.handle(req2).pipe(
tap(null, (err: HttpErrorResponse) => {
if (err.status === 401) {
... // handle auth errors, auth again, save url and remake call, etc...
}
}),
catchError((e, c) => { ... })
);
}));
return rc;
}
The only thing weird about the above is that the library's acquireToken
accepts a callback function and I am converting it into an observable by using rxjs
's bindCallback
but other than that, it simply works.
Notice that the acquireToken
method doesn't accept any arguments (contrary to what I said in the comment to the question).
I tried this solution but it is not returning refreshtoken before expiration of accesstoken
– Sandip
Nov 14 '18 at 9:44
add a comment |
I will try to give my code which works, but which doesn't use the wrapper adal-angular6
but rather the official adal-angular
from AzureAD.
This is my angular.json
part which loads the library:
{
...
"projects": {
"my-app": {
...
"architect": {
"build": {
...
"options": {
...
"scripts": [
"node_modules/adal-angular/dist/adal.min.js"
]
This is the part of my authentication service that initializes the library:
declare var AuthenticationContext;
@Injectable(...)
export class AuthService {
adalConfig = {
tenant: '*******.com',
clientId: '12345678-9abc-def0-1234-56789abcdef0',
redirectUri: environment.redirectPath,
postLogoutRedirectUri: environment.redirectPath,
cacheLocation: 'localStorage',
};
authContext;
constructor(http: HttpClient) {
this.authContext = new AuthenticationContext(this.adalConfig);
}
acquireToken(): Observable<string> {
const func: (a: string, c: (error, token: string) => void) => void = (a, c) => {
(this.authContext.acquireToken.bind(this.authContext))(a, c);
};
const bound = bindCallback(func);
return bound(this.authContext.config.clientId).pipe(map(([e, r]) => r));
}
...
}
And this is what is happening in my interceptor before every Ajax call:
@Injectable()
export class TokenInterceptor implements HttpInterceptor {
constructor(auth: AuthService, route: Router) { }
intercept(request: HttpRequest<any>, next: HttpHandler):
Observable<HttpSentEvent
| HttpHeaderResponse
| HttpProgressEvent
| HttpResponse<any>
| HttpUserEvent<any>> {
const tokenGetter = this.auth.acquireToken();
const rc = tokenGetter.pipe(
take(1),
switchMap(r => {
const req2 = r && request.clone({
setHeaders: {
Authorization: `Bearer ${r}`
}
}) || request;
return next.handle(req2).pipe(
tap(null, (err: HttpErrorResponse) => {
if (err.status === 401) {
... // handle auth errors, auth again, save url and remake call, etc...
}
}),
catchError((e, c) => { ... })
);
}));
return rc;
}
The only thing weird about the above is that the library's acquireToken
accepts a callback function and I am converting it into an observable by using rxjs
's bindCallback
but other than that, it simply works.
Notice that the acquireToken
method doesn't accept any arguments (contrary to what I said in the comment to the question).
I tried this solution but it is not returning refreshtoken before expiration of accesstoken
– Sandip
Nov 14 '18 at 9:44
add a comment |
I will try to give my code which works, but which doesn't use the wrapper adal-angular6
but rather the official adal-angular
from AzureAD.
This is my angular.json
part which loads the library:
{
...
"projects": {
"my-app": {
...
"architect": {
"build": {
...
"options": {
...
"scripts": [
"node_modules/adal-angular/dist/adal.min.js"
]
This is the part of my authentication service that initializes the library:
declare var AuthenticationContext;
@Injectable(...)
export class AuthService {
adalConfig = {
tenant: '*******.com',
clientId: '12345678-9abc-def0-1234-56789abcdef0',
redirectUri: environment.redirectPath,
postLogoutRedirectUri: environment.redirectPath,
cacheLocation: 'localStorage',
};
authContext;
constructor(http: HttpClient) {
this.authContext = new AuthenticationContext(this.adalConfig);
}
acquireToken(): Observable<string> {
const func: (a: string, c: (error, token: string) => void) => void = (a, c) => {
(this.authContext.acquireToken.bind(this.authContext))(a, c);
};
const bound = bindCallback(func);
return bound(this.authContext.config.clientId).pipe(map(([e, r]) => r));
}
...
}
And this is what is happening in my interceptor before every Ajax call:
@Injectable()
export class TokenInterceptor implements HttpInterceptor {
constructor(auth: AuthService, route: Router) { }
intercept(request: HttpRequest<any>, next: HttpHandler):
Observable<HttpSentEvent
| HttpHeaderResponse
| HttpProgressEvent
| HttpResponse<any>
| HttpUserEvent<any>> {
const tokenGetter = this.auth.acquireToken();
const rc = tokenGetter.pipe(
take(1),
switchMap(r => {
const req2 = r && request.clone({
setHeaders: {
Authorization: `Bearer ${r}`
}
}) || request;
return next.handle(req2).pipe(
tap(null, (err: HttpErrorResponse) => {
if (err.status === 401) {
... // handle auth errors, auth again, save url and remake call, etc...
}
}),
catchError((e, c) => { ... })
);
}));
return rc;
}
The only thing weird about the above is that the library's acquireToken
accepts a callback function and I am converting it into an observable by using rxjs
's bindCallback
but other than that, it simply works.
Notice that the acquireToken
method doesn't accept any arguments (contrary to what I said in the comment to the question).
I will try to give my code which works, but which doesn't use the wrapper adal-angular6
but rather the official adal-angular
from AzureAD.
This is my angular.json
part which loads the library:
{
...
"projects": {
"my-app": {
...
"architect": {
"build": {
...
"options": {
...
"scripts": [
"node_modules/adal-angular/dist/adal.min.js"
]
This is the part of my authentication service that initializes the library:
declare var AuthenticationContext;
@Injectable(...)
export class AuthService {
adalConfig = {
tenant: '*******.com',
clientId: '12345678-9abc-def0-1234-56789abcdef0',
redirectUri: environment.redirectPath,
postLogoutRedirectUri: environment.redirectPath,
cacheLocation: 'localStorage',
};
authContext;
constructor(http: HttpClient) {
this.authContext = new AuthenticationContext(this.adalConfig);
}
acquireToken(): Observable<string> {
const func: (a: string, c: (error, token: string) => void) => void = (a, c) => {
(this.authContext.acquireToken.bind(this.authContext))(a, c);
};
const bound = bindCallback(func);
return bound(this.authContext.config.clientId).pipe(map(([e, r]) => r));
}
...
}
And this is what is happening in my interceptor before every Ajax call:
@Injectable()
export class TokenInterceptor implements HttpInterceptor {
constructor(auth: AuthService, route: Router) { }
intercept(request: HttpRequest<any>, next: HttpHandler):
Observable<HttpSentEvent
| HttpHeaderResponse
| HttpProgressEvent
| HttpResponse<any>
| HttpUserEvent<any>> {
const tokenGetter = this.auth.acquireToken();
const rc = tokenGetter.pipe(
take(1),
switchMap(r => {
const req2 = r && request.clone({
setHeaders: {
Authorization: `Bearer ${r}`
}
}) || request;
return next.handle(req2).pipe(
tap(null, (err: HttpErrorResponse) => {
if (err.status === 401) {
... // handle auth errors, auth again, save url and remake call, etc...
}
}),
catchError((e, c) => { ... })
);
}));
return rc;
}
The only thing weird about the above is that the library's acquireToken
accepts a callback function and I am converting it into an observable by using rxjs
's bindCallback
but other than that, it simply works.
Notice that the acquireToken
method doesn't accept any arguments (contrary to what I said in the comment to the question).
answered Nov 13 '18 at 15:59
Aviad P.Aviad P.
18k77695
18k77695
I tried this solution but it is not returning refreshtoken before expiration of accesstoken
– Sandip
Nov 14 '18 at 9:44
add a comment |
I tried this solution but it is not returning refreshtoken before expiration of accesstoken
– Sandip
Nov 14 '18 at 9:44
I tried this solution but it is not returning refreshtoken before expiration of accesstoken
– Sandip
Nov 14 '18 at 9:44
I tried this solution but it is not returning refreshtoken before expiration of accesstoken
– Sandip
Nov 14 '18 at 9:44
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53282974%2fget-refresh-token-of-azure-ad-using-adal-angular%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Well to be honest, I am using
adal-angular
from AzureAD not the wrappersadal-angular4
oradal-angular6
- and in my case, it just works. The argument toacquireToken
is not the same as in your code tho, it is theauthContext
object.– Aviad P.
Nov 13 '18 at 15:46
@AviadP.it will be good if you can share example. How to get authContext ?
– Sandip
Nov 13 '18 at 15:51