Skip to content

[Bug]: AAD-B2C App Admin Consent via az cli - az ad app permission admin-consent --id xx-xx-xx not working #18614

Description

@fabienso

Hey everyone

I have the following problem with the AzureCLI:
After adding new "Application-Registration" graph rights, I want to approve/agree them with the tenant admin via AzureCLI.

For this I use the following command.

Example by the microsoft docs:
az ad app permission admin-consent --id 00000000-0000-0000-0000-000000000000

My az ad app command with the specific application-registration (app-id)
az ad app permission admin-consent --id 261b6aa5-0000-0000-0000-000000000000

The "0000-0000-0000-000000000000" UUID4 is a placeholder for this issue.

PS C:\dev\tenant-c\tool-tenant-creation> az ad app permission admin-consent --id 261b6aa5-0000-0000-0000-000000000000
Not Found(<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>404 - File or directory not found.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
 <div class="content-container"><fieldset>
  <h2>404 - File or directory not found.</h2>
  <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
 </fieldset></div>
</div>
</body>
</html>
)

--debug --verbose (Excerpt)

msrest.http_logger: Request URL: 'https://graph.windows.net/705209c2-0000-0000-0000-000000000000/applications/120f8b30-0000-0000-0000-000000000000api-version=1.6'
msrest.http_logger: Request method: 'GET'
msrest.http_logger: Request headers:
msrest.http_logger:     'Accept': 'application/json'
msrest.http_logger:     'accept-language': 'en-US'
msrest.http_logger:     'User-Agent': 'python/3.8.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.25.0 (MSI)'
msrest.http_logger: Request body:
msrest.http_logger: None
msrest.universal_http: Configuring redirects: allow=True, max=30
msrest.universal_http: Configuring request: timeout=100, verify=True, cert=None
msrest.universal_http: Configuring proxies: ''
msrest.universal_http: Evaluate proxies against ENV settings: True
urllib3.connectionpool: Starting new HTTPS connection (1): graph.windows.net:443
urllib3.connectionpool: https://graph.windows.net:443 "GET /705209c2-0000-0000-0000-000000000000/applications/120f8b30-0000-0000-0000-000000000000?api-version=1.6 HTTP/1.1" 200 2030
msrest.http_logger: Response status: 200
msrest.http_logger: Response headers:
msrest.http_logger:     'Cache-Control': 'no-cache'
msrest.http_logger:     'Pragma': 'no-cache'
msrest.http_logger:     'Content-Type': 'application/json; odata=minimalmetadata; streaming=true; charset=utf-8'
msrest.http_logger:     'Expires': '-1'
msrest.http_logger:     'ocp-aad-diagnostics-server-name': '0VjgWXqSj21a48xxxxxxxxxxxxxxxxxxx'
msrest.http_logger:     'request-id': 'dd1886a2-0000-0000-0000-000000000000'
msrest.http_logger:     'client-request-id': '920bc194-0000-0000-0000-000000000000'
msrest.http_logger:     'x-ms-dirapi-data-contract-version': '1.6'

Releated docs: https://docs.microsoft.com/en-us/cli/azure/ad/app/permission?view=azure-cli-latest

This command worked a few days ago, but unfortunately not anymore.
Do you have any ideas to resolve this problem?

Best regards

Metadata

Metadata

Assignees

Labels

Graph(doesn't work with label-triggered comments; use Graph.Microsoft instead) az adService AttentionThis issue is responsible by Azure service team.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions