Azure / Azure/azure-rest-api-specs

Programmatically generate the consent code for credential manager for APIM

Open
#30,095 4 comments 0 reactions 1 assignee Assigned to @jukasper View on GitHub
API Management customer-reported Mgmt question Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
6k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

### API Spec link

https://raw.githubusercontent.com/Azure/azure-rest-api-specs/c37a507e520767c5bafde6d8fbf9aabef6316fdb/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-09-01-preview/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json

### API Spec version

2022-08-01

### Question/Query

Is there a way to programmatically generate the consent code? There is an SDK to confirm once the user visits the page.
Link to the page: https://learn.microsoft.com/en-us/rest/api/apimanagement/authorization/confirm-consent-code?view=rest-apimanagement-2022-08-01&tabs=Python

client. authorization.confirm_consent_code( resource_group_name="rg1", service_name="apimService1", authorization_provider_id="oauthcode", authorization_id="authz1", parameters={"consentCode": "theconsentcode"}, )

Describe the solution you'd like
We are looking for—a way for users to skip consent without leaving our site. Our site is already configured as an OAuth provider to the credential manager.

Additional context
We want to avoid the screen when authorizing credential managers and using the authorization code method.

image
![image](https://github.com/user-attachments/assets/b2054d7e-5aa2-496a-8996-e8d0cf03ea4d)

### Environment

_No response_

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.