OAuthRequiredScopes Parameter (Connect-HubSpot Cmdlet)
Specifies a space-separated list of required OAuth scopes that the HubSpot app must request during authentication.
Syntax
Connect-HubSpot -OAuthRequiredScopes string
Data Type
cstr
Default Value
"oauth crm.lists.read crm.lists.write crm.objects.companies.read crm.objects.companies.write crm.objects.contacts.read crm.objects.contacts.write crm.objects.deals.read crm.objects.deals.write crm.objects.owners.read crm.schemas.deals.read crm.schemas.deals.write crm.schemas.companies.read crm.schemas.companies.write crm.schemas.contacts.read crm.schemas.contacts.write"
Remarks
This property defines the minimum set of permissions (OAuth scopes) that must be requested from HubSpot when connecting using OAuth 2.0. These scopes allow the cmdlet to read and write data from specific objects and schemas in your HubSpot account.
HubSpot scopes define what your application can do. Whether it's reading contacts, updating deals, or syncing schemas. These permissions are granted by the user during the OAuth consent flow.
There are two kinds of scopes that may appear in this list:
- Required scopes must always be included. If any are missing, HubSpot rejects the authorization request and displays an error to the user.
- Conditionally required scopes may depend on the user's account type or the specific HubSpot features enabled. If one of these scopes is included but not available in the user’s account, the authorization fails with an error.
You can modify this list to reduce the permissions your app requests, especially if your app only interacts with a limited set of HubSpot features such as contacts. For example: "oauth crm.objects.contacts.read crm.objects.contacts.write". This configuration only requests access to contact records.
Important: Scopes must be space-separated, not comma-separated. This formatting follows the OAuth 2.0 standard and is required by the HubSpot API. Using commas results in an invalid or incomplete authorization request. To learn more about available scopes and how to configure them, refer to the HubSpot API documentation for more details.