你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
MicrosoftGraphOAuth2PermissionGrant Class
- java.
lang. Object - com.
azure. resourcemanager. authorization. fluent. models. MicrosoftGraphEntity - com.
azure. resourcemanager. authorization. fluent. models. MicrosoftGraphOAuth2PermissionGrant
- com.
- com.
public final class MicrosoftGraphOAuth2PermissionGrant
extends MicrosoftGraphEntity
oAuth2PermissionGrant.
Constructor Summary
Constructor | Description |
---|---|
MicrosoftGraphOAuth2PermissionGrant() |
Creates an instance of Microsoft |
Method Summary
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
additionalProperties()
Get the additional |
String |
clientId()
Get the client |
String |
consentType()
Get the consent |
static
Microsoft |
fromJson(JsonReader jsonReader)
Reads an instance of Microsoft |
String |
principalId()
Get the principal |
String |
resourceId()
Get the resource |
String |
scope()
Get the scope property: A space-separated list of the claim values for delegated permissions which should be included in access tokens for the resource application (the API). |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Microsoft |
withAdditionalProperties(Map<String,Object> additionalProperties)
Set the additional |
Microsoft |
withClientId(String clientId)
Set the client |
Microsoft |
withConsentType(String consentType)
Set the consent |
Microsoft |
withId(String id)
Set the id property: Read-only. |
Microsoft |
withPrincipalId(String principalId)
Set the principal |
Microsoft |
withResourceId(String resourceId)
Set the resource |
Microsoft |
withScope(String scope)
Set the scope property: A space-separated list of the claim values for delegated permissions which should be included in access tokens for the resource application (the API). |
Methods inherited from MicrosoftGraphEntity
Methods inherited from java.lang.Object
Constructor Details
MicrosoftGraphOAuth2PermissionGrant
public MicrosoftGraphOAuth2PermissionGrant()
Creates an instance of MicrosoftGraphOAuth2PermissionGrant class.
Method Details
additionalProperties
public Map
Get the additionalProperties property: oAuth2PermissionGrant.
Overrides:
MicrosoftGraphOAuth2PermissionGrant.additionalProperties()Returns:
clientId
public String clientId()
Get the clientId property: The id of the client service principal for the application which is authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only).
Returns:
consentType
public String consentType()
Get the consentType property: Indicates if authorization is granted for the client application to impersonate all users or only a specific user. AllPrincipals indicates authorization to impersonate all users. Principal indicates authorization to impersonate a specific user. Consent on behalf of all users can be granted by an administrator. Non-admin users may be authorized to consent on behalf of themselves in some cases, for some delegated permissions. Required. Supports $filter (eq only).
Returns:
fromJson
public static MicrosoftGraphOAuth2PermissionGrant fromJson(JsonReader jsonReader)
Reads an instance of MicrosoftGraphOAuth2PermissionGrant from the JsonReader.
Parameters:
Returns:
Throws:
principalId
public String principalId()
Get the principalId property: The id of the user on behalf of whom the client is authorized to access the resource, when consentType is Principal. If consentType is AllPrincipals this value is null. Required when consentType is Principal.
Returns:
resourceId
public String resourceId()
Get the resourceId property: The id of the resource service principal to which access is authorized. This identifies the API which the client is authorized to attempt to call on behalf of a signed-in user.
Returns:
scope
public String scope()
Get the scope property: A space-separated list of the claim values for delegated permissions which should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the publishedPermissionScopes property of the resource service principal.
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
MicrosoftGraphOAuth2PermissionGrant.toJson(JsonWriter jsonWriter)Parameters:
Throws:
validate
public void validate()
Validates the instance.
Overrides:
MicrosoftGraphOAuth2PermissionGrant.validate()withAdditionalProperties
public MicrosoftGraphOAuth2PermissionGrant withAdditionalProperties(Map
Set the additionalProperties property: oAuth2PermissionGrant.
Overrides:
MicrosoftGraphOAuth2PermissionGrant.withAdditionalProperties(Map<String,Object> additionalProperties)Parameters:
Returns:
withClientId
public MicrosoftGraphOAuth2PermissionGrant withClientId(String clientId)
Set the clientId property: The id of the client service principal for the application which is authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only).
Parameters:
Returns:
withConsentType
public MicrosoftGraphOAuth2PermissionGrant withConsentType(String consentType)
Set the consentType property: Indicates if authorization is granted for the client application to impersonate all users or only a specific user. AllPrincipals indicates authorization to impersonate all users. Principal indicates authorization to impersonate a specific user. Consent on behalf of all users can be granted by an administrator. Non-admin users may be authorized to consent on behalf of themselves in some cases, for some delegated permissions. Required. Supports $filter (eq only).
Parameters:
Returns:
withId
public MicrosoftGraphOAuth2PermissionGrant withId(String id)
Set the id property: Read-only.
Overrides:
MicrosoftGraphOAuth2PermissionGrant.withId(String id)Parameters:
withPrincipalId
public MicrosoftGraphOAuth2PermissionGrant withPrincipalId(String principalId)
Set the principalId property: The id of the user on behalf of whom the client is authorized to access the resource, when consentType is Principal. If consentType is AllPrincipals this value is null. Required when consentType is Principal.
Parameters:
Returns:
withResourceId
public MicrosoftGraphOAuth2PermissionGrant withResourceId(String resourceId)
Set the resourceId property: The id of the resource service principal to which access is authorized. This identifies the API which the client is authorized to attempt to call on behalf of a signed-in user.
Parameters:
Returns:
withScope
public MicrosoftGraphOAuth2PermissionGrant withScope(String scope)
Set the scope property: A space-separated list of the claim values for delegated permissions which should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the publishedPermissionScopes property of the resource service principal.
Parameters:
Returns: