Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entra (AAD) provisioning error #504

Open
vejadutoo opened this issue Sep 7, 2024 · 6 comments · Fixed by #505
Open

Entra (AAD) provisioning error #504

vejadutoo opened this issue Sep 7, 2024 · 6 comments · Fixed by #505

Comments

@vejadutoo
Copy link

When trying to provision a new user through the Create user in Azure Active Directory integration I get a 400 error when the execute block POSTs.

From what I can tell, the POST data is all good, it's definitely valid JSON, and all of the keys map correctly to Graph, and the headers are there.

Of note, the Test user exist works just fine.

Status code:
400

Method and URL
POST: https://graph.microsoft.com/v1.0/users

Response:

{
    "error": {
        "code": "BadRequest",
        "message": "Unable to read JSON request payload. Please ensure Content-Type header is set and payload is of valid JSON format.",
        "innerError": {
            "date": "2024-09-07T00:48:00",
            "request-id": "xxxx",
            "client-request-id": "xxxx"
        }
    }
}

Post data:

{
    "displayName": "John Doe",
    "mailNickname": "JohnDoe",
    "accountEnabled": true,
    "passwordProfile": {
        "password": "***Secret value for PASSWORD***",
        "forceChangePasswordNextSignIn": true
    },
    "userPrincipalName": "[email protected]"
}

Headers

{
    "Content-Type": "application/json",
    "Authorization": "***Secret value for oauth.token_type*** ***Secret value for oauth.access_token***"
}`
@GDay
Copy link
Member

GDay commented Sep 7, 2024

Try using "cast_data_to_json": true. Example: https://integrations.chiefonboarding.com/manifest/15 (on the execute request).

By default, ChiefOnboarding will try to push the data as a string. Using that will cast the data to a json. It's debatable whether that's a sane default (probably not), but I think setting the above should work for you.

@vejadutoo
Copy link
Author

vejadutoo commented Sep 7, 2024

This is default checked:
image

I added it just to be sure:
image

I got a 20x the first time i ran the test from the builder, but now it's giving me the same 400 as before and I can't replicate the success even with changing around the execute request. Also if I edit the execute block in the builder the app hangs and I have to paste the manifest back in using update
image

@GDay
Copy link
Member

GDay commented Sep 7, 2024

Might be a bug in the builder. I will check it out tomorrow.

@GDay
Copy link
Member

GDay commented Sep 7, 2024

I hoping the fix I pushed up to master is resolving this for you. I don't have an active AD subscription, so it's a little tricky to reproduce this issue.

@GDay GDay reopened this Sep 7, 2024
@vejadutoo
Copy link
Author

I appreciate the help. I'm using a docker deployment, so I have to wait for the image to reflect the fix.

Also, I got the 200 status again. It was just the login 🤦

image

In the meantime, I'm in way over my head so I'll do some reading to see if I can figure this out. I'm assuming that other people are using the integration without issue, so I have to believe there's something wrong in my deployment.

@GDay
Copy link
Member

GDay commented Sep 9, 2024

Just released v2.2.4 on Dockerhub.

Also, I got the 200 status again. It was just the login 🤦

So it's working now as expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants