Skip to content

New-MgServicePrincipalSynchronizationJobOnDemand Cannot submit on demand job for GitHub Enterprise Managed User app #3441

@rglova

Description

@rglova

Describe the bug

I'm trying to submit on demand job for GitHub Enterprise Managed User app with cmd:

New-MgServicePrincipalSynchronizationJobOnDemand -Debug -ServicePrincipalId $ServicePrincipalId -SynchronizationJobId $SynchronizationJobId -BodyParameter $ProvisionParams

Error:
Line |
185 | … Provision-Roles -SynchronizationJobId $SynchronizationJobId -Synchr …
| ~~~~~~~~~~~~~~~~~~~~~
| Cannot process argument transformation on parameter 'SynchronizationJobId'. Cannot convert value "gitHubEnterpriseCloud.6855a1b4381643d2bf35178317e72fb0.16d1d3e9-9c52-4ae0-8e09-b16d336d0984" to type "System.Guid". Error: "Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."

But In this case it's an actual job Id: gitHubEnterpriseCloud.6855a1b4381643d2bf35178317e72fb0.16d1d3e9-9c52-4ae0-8e09-b16d336d0984

Expected behavior

Command would not fail (possibly add a param that will dis)able type casting or ignore an error

How to reproduce

New-MgServicePrincipalSynchronizationJobOnDemand -Debug -ServicePrincipalId '<SP_id>' -SynchronizationJobId 'gitHubEnterpriseCloud.6855a1b4381643d2bf35178317e72fb0.16d1d3e9-9c52-4ae0-8e09-b16d336d0984' -BodyParameter $ProvisionParams

SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions