How to get Token as a string?
Closed this issue · 4 comments
sudipta-chaudhari commented
How can I fetch the Token as a string as I need to pass the Bearer token to authenticate & call a REST service.
davidguerra commented
Same problem! Help Please!!
ranveeraggarwal commented
I generally have a service that looks like:
@Injectable()
export class AuthService {
constructor(private adalService: AdalService) {}
public getToken(): Observable<string> {
return this.adalService.acquireToken("https://xyz.onmicrosoft.com/abc").map(
token => token.toString()
);
}
}
sudipta-chaudhari commented
This is working only for Azure B2B AD and not for Azure B2C AD. I need to provide the B2C SignIn policy. (1) How can I make it work with B2C Azure AD?
(2) How do I list the B2C Azure AD claims?
ranveeraggarwal commented
I am not sure how to do that. But according to this link, you might need to make graph calls to get claims: https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-devquickstarts-graph-dotnet