Class MicrosoftGraphOAuth2PermissionGrantInner
- java.lang.Object
-
- com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphEntity
-
- com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphOAuth2PermissionGrantInner
-
public final class MicrosoftGraphOAuth2PermissionGrantInner extends MicrosoftGraphEntity
oAuth2PermissionGrant.
-
-
Constructor Summary
Constructors Constructor Description MicrosoftGraphOAuth2PermissionGrantInner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
additionalProperties()
Get the additionalProperties property: oAuth2PermissionGrant.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.String
consentType()
Get the consentType property: Indicates if authorization is granted for the client application to impersonate all users or only a specific user.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.String
resourceId()
Get the resourceId property: The id of the resource service principal to which access is authorized.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).void
validate()
Validates the instance.MicrosoftGraphOAuth2PermissionGrantInner
withAdditionalProperties(Map<String,Object> additionalProperties)
Set the additionalProperties property: oAuth2PermissionGrant.MicrosoftGraphOAuth2PermissionGrantInner
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.MicrosoftGraphOAuth2PermissionGrantInner
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.MicrosoftGraphOAuth2PermissionGrantInner
withId(String id)
Set the id property: Read-only.MicrosoftGraphOAuth2PermissionGrantInner
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.MicrosoftGraphOAuth2PermissionGrantInner
withResourceId(String resourceId)
Set the resourceId property: The id of the resource service principal to which access is authorized.MicrosoftGraphOAuth2PermissionGrantInner
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 class com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphEntity
id
-
-
-
-
Method Detail
-
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:
- the clientId value.
-
withClientId
public MicrosoftGraphOAuth2PermissionGrantInner 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:
clientId
- the clientId value to set.- Returns:
- the MicrosoftGraphOAuth2PermissionGrantInner object itself.
-
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:
- the consentType value.
-
withConsentType
public MicrosoftGraphOAuth2PermissionGrantInner 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:
consentType
- the consentType value to set.- Returns:
- the MicrosoftGraphOAuth2PermissionGrantInner object itself.
-
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:
- the principalId value.
-
withPrincipalId
public MicrosoftGraphOAuth2PermissionGrantInner 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:
principalId
- the principalId value to set.- Returns:
- the MicrosoftGraphOAuth2PermissionGrantInner object itself.
-
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:
- the resourceId value.
-
withResourceId
public MicrosoftGraphOAuth2PermissionGrantInner 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:
resourceId
- the resourceId value to set.- Returns:
- the MicrosoftGraphOAuth2PermissionGrantInner object itself.
-
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:
- the scope value.
-
withScope
public MicrosoftGraphOAuth2PermissionGrantInner 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:
scope
- the scope value to set.- Returns:
- the MicrosoftGraphOAuth2PermissionGrantInner object itself.
-
additionalProperties
public Map<String,Object> additionalProperties()
Get the additionalProperties property: oAuth2PermissionGrant.- Overrides:
additionalProperties
in classMicrosoftGraphEntity
- Returns:
- the additionalProperties value.
-
withAdditionalProperties
public MicrosoftGraphOAuth2PermissionGrantInner withAdditionalProperties(Map<String,Object> additionalProperties)
Set the additionalProperties property: oAuth2PermissionGrant.- Overrides:
withAdditionalProperties
in classMicrosoftGraphEntity
- Parameters:
additionalProperties
- the additionalProperties value to set.- Returns:
- the MicrosoftGraphOAuth2PermissionGrantInner object itself.
-
withId
public MicrosoftGraphOAuth2PermissionGrantInner withId(String id)
Set the id property: Read-only.- Overrides:
withId
in classMicrosoftGraphEntity
- Parameters:
id
- the id value to set.- Returns:
- the MicrosoftGraphEntity object itself.
-
validate
public void validate()
Validates the instance.- Overrides:
validate
in classMicrosoftGraphEntity
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-