Skip to content

PNP Connection Failure with Custom App Registration + non-onmicrosoft UPN #151

@amitmtank

Description

@amitmtank

Probably a specific scenario but wanted to report the finding here.

  • Custom Aapp registration for Microsoft Graph PowerShell with Delegation access and using it for M365DSC exports.
  • Using on-prem synced cloud admin account that has UPN in different format than contoso.onmicrosoft.com.

Failing with below error:

`[WARNING] We recommend providing the username in the format of .onmicrosoft.* for the Credential property.
Exporting Microsoft 365 configuration for Components: ODSettings, SPOApp, SPOBrowserIdleSignout, SPOHomeSite, SPOHubSite, SPOOrgAssetsLibrary, SPOSearchManagedProperty, SPOSearchResultSource, SPOSiteDesign, SPOSiteDesignRights, SPOSiteScript, SPOStorageEntity, SPOTenantCdnEnabled, SPOTenantCdnPolicy, SPOTheme

Authentication methods specified:

  • CredentialsWithApplicationId

Connecting to {PnP}...❌
TenantId must be in format contoso.onmicrosoft.com`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions