Azure / Azure/azure-cli

CAE causes Microsoft Graph API calls to fail

Open
#24,684 14 comments 13 reactions 1 assignee Claimed by @jiasli View on GitHub
Account act-identity-squad Auto-Assign Azure CLI Team customer-reported feature-request Graph
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

## Describe the bug

The CLI is failing to communicate with the Microsoft Graph due to some issue with Continuous Access Evaluation. Below is an example of a command that returns a CAE challenge error message, though other commands have done the same.

This error is happening immediately after I authenticated with `az login`, so it's highly unlikely that any of the session's properties have changed (IP/location included).

**Command Name**
`az ad app owner add`

**Errors:**
```
Continuous access evaluation resulted in claims challenge with result: InteractionRequired and code: LocationConditionEvaluationSatisfied
```

## To Reproduce:

1. Authenticate with `az login`
2. Run a command such as `az ad app owner add --id {app id} --owner-object-id {owner oid}`
3. Hopefully, _voila!_

## Expected Behavior

## Environment Summary

```
Windows-10-10.0.22621-SP0
Python 3.10.8
Installer: MSI

azure-cli 2.42.0
```

## Additional Context

Confirmed that downgrading to v2.40 of the CLI (before CAE was introduced in v2.41) and logging out/back in is a workaround.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.