I am writing an angular.io app that will call rest APIs in Azure DevOps. I'm using the MSAL library and it is almost working. I successfully authenticate and call the Azure DevOps API, and I see that the MSAL HTTP interceptor added a Bearer token to the request (via Chrome developer tools).
https://dev.azure.com/my org/my project/my team/_apis/wit/wiql/my query id?api-version=5.1
Azure responds to this request with a 302 to redirect me to https://spsprodcus1.vssps.visualstudio.com/_signin
. I can see that the Bearer token is sent with this request as well. That address gives me a 203 with the message:
Microsoft Internet Explorer's Enhanced Security Configuration is currently enabled on your environment. This enhanced level of security prevents our web integration experiences from displaying or performing correctly. To continue with your operation please disable this configuration or contact your administrator.
It seems like maybe my app doesn't have permission to do things in DevOps. In the app I registered for this and pointed MSAL, in "API Permissions" I gave access to "Azure DevOps (1)".
Any thoughts on what I can do about this?
--Edit
Below is what my token decodes to (with some redactions). I'm not doing anything with it, MSAL seems to take it from location header in the response to my authorize request and put it in the authorization header of my restful call (with the prefix "Bearer ").
{
"typ": "JWT",
"alg": "RS256",
"x5t": "encoded Stuff",
"kid": "encoded Stuff"
}
{
"aud": "api://44df9afb-cf92-4965-9378-05317e85ab96",
"iss": "https://sts.windows.net/GUID/",
"iat": 1585087477,
"nbf": 1585087477,
"exp": 1585091377,
"acr": "1",
"aio": "encoded Stuff",
"amr": [
"wia"
],
"appid": "id of the app I registered",
"appidacr": "0",
"family_name": "Rispoli",
"given_name": "Thomas",
"in_corp": "true",
"ipaddr": "ip address",
"name": "Rispoli, Thomas",
"oid": "encoded Stuff",
"onprem_sid": "encoded Stuff",
"scp": "user_impersonation",
"sub": "encoded Stuff",
"tid": "encoded Stuff",
"unique_name": "thomas.rispoli@cgi.com",
"upn": "thomas.rispoli@cgi.com",
"uti": "encoded Stuff",
"ver": "1.0"
} Then some binary data that I assume is a nounce