The user consent flow is implemented by default for Office 365 organizations, but an administrator can change this default to prevent end-users from installing applications.
If the user consent is turned off, problems like this can occur when trying to connect to cloudHQ:
How to turn on user consent in Office365:
- Get the Windows Azure AD PowerShell Module.
- Connect to your Office 365 Tenant.
- Check the current settings for allowing user consent.
- Turn on user consent to applications.
- Verify that user consent to applications is turned on.
$msolcred = get-credential
connect-msolservice -credential $msolcred
Get-MsolCompanyInformation | fl DisplayName,UsersPermissionToUserConsentToAppEnabled
DisplayName : Contoso
UsersPermissionToUserConsentToAppEnabled : False
Note: A value of “False” indicates that users cannot consent to applications.
Set-MsolCompanySettings –UsersPermissionToUserConsentToAppEnabled:$true
Get-MsolCompanyInformation | fl DisplayName,UsersPermissionToUserConsentToAppEnabled
DisplayName : Contoso
UsersPermissionToUserConsentToAppEnabled : True
Note: A value of “True” indicates that users can consent to applications.
Important: Turning on user consent impacts users in the following ways:
- End users can consent to applications. This means that installed or native applications can be installed in the Office 365 organization. It is possible for an administrator to install a native application and make it available to all users.
- Existing consents that users provided remain valid until the user either revokes the consent (for web applications) or uninstalls the application (for native applications).