I have a web app written in Angular 7. I'm trying to consume Azure DevOps APIs and I understand that I have to setup an Azure Active Directory App. I have tried few libraries like adal-angular
msal-angular
and wrappers like microsoft-adal-angular6
. Followed their documentations and samples. I can successfully access the User's name, emails and a token. I can use the token for Microsoft Graph apis but not for Azure DevOps apis. I tried using this token as a Authentication Bearer
for my HttpClient
however I'm getting Status Code 203.
Then I found this answer and I think this is the missing part that I need but its for dotNet.
The API Im cosuming: https://app.vssps.visualstudio.com/_apis/accounts
Q:
- What is the token Im getting?
- How can I get the appropriate token using Angular 7?
- What libraries do I need?
"499b84ac-1321-427f-aa17-267ca6975798"
. If you use MSAL, you can then ask for a token with scope:"499b84ac-1321-427f-aa17-267ca6975798/.default"
. – juunasVisual Studio Team Services
withuser_impersonation
scope. – Hexxed"499b84ac-1321-427f-aa17-267ca6975798/.default"
in theacquireToken
methods. Thanks – Hexxed