grumar / adal-angular5

Angular 5 ADAL Wrapper
MIT License
12 stars 19 forks source link

BUG: Cannot call Microsoft Graph using adal-angular5 #35

Open tsiesser opened 6 years ago

tsiesser commented 6 years ago

Due to changes in the underlying adal-angular package, adal-angular5 is no longer able to make calls to Microsoft Graph or other services that use the Adal5HTTPService.

I'm using the development release 2.1.1 that successfully addresses some other issues.

Specifically, this line in Adal5Service (adal5.service.ts): this.adalContext.callback = (window.parent as any).callBackMappedToRenewStates[requestInfo.stateResponse]; now causes an error because callBackMappedToRenewStates was made private (_callBackMappedToRenewStates) in adal-angular as of release 1.0.16.

See this commit: https://github.com/AzureAD/azure-activedirectory-library-for-js/commits/dev/lib/adal.js

And this issue: https://github.com/AzureAD/azure-activedirectory-library-for-js/issues/690

Impact: When I call Microsoft Graph after initial authentication (i.e. after login is called), on the redirect after the access token is retrieved for MS Graph, I get an error in handleWindowCallback because window.parent.callBackMappedToRenewStates is not defined.

btastic commented 6 years ago

I have the same issue. Any way to work around this?