-
Notifications
You must be signed in to change notification settings - Fork 1
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
HTTP/1.1 400 Bad Request when running Set-ProfileCardPronoun.ps1 #8
Comments
Can you change line 46 to include a -Debug and try running again? That should hopefully provide some additional info on why it is failing. $result = Invoke-MgGraphRequest -Uri $uri -Method PATCH -Body $bodyJson -Debug |
I was able to get it working by changing the code on line 46 to: $result = Invoke-MgGraphRequest -Uri $uri -Method POST -Body $bodyJson I've change PATCH to POST. Now, I'm having some difficulties with the Invoke-PronounSync. I'm getting this error when trying to run it.
I've checked the API permissions and all looks good there. |
When you used PnPConnect did you connect with the url to SharePoint admin? E.g. $AdminCenterURL = "https://crescent-admin.sharepoint.com" #Connect to Tenant Admin |
I've run the .\Invoke-PronounSync.ps1 -Tenant xxx.onmicrosoft.com -Url 'https://xxx-admin.sharepoint.com' -ClientId <APPID> -Certificate '.\User Pronoun Sync App.pfx' When trying to connect using your suggested method I got this error: Connect-PnPOnline : AADSTS65001: The user or administrator has not consented to use the application with ID
'31359c7f-bd7e-475c-86db-fdb8c937548e' named 'PnP Management Shell'. Send an interactive authorization request for
this user and resource. I've connected using the below command and accepted the consent to use the PnP Management Shell Connect-PnPOnline -Url $adminurl -PnPManagementShell While I was able to connect using |
Hello,
I've cloned the repo and when trying to run
.\Set-ProfileCardPronoun.ps1 -PronounAttribute extensionAttribute7
I'm getting this error message:
`Invoke-MgGraphRequest : PATCH https://graph.microsoft.com/beta/organization/626943f2-f827-4ac9-a162-0c28f72d8252/settings/profileCardProperties
HTTP/1.1 400 Bad Request
Transfer-Encoding: chunked
Vary: Accept-Encoding
Strict-Transport-Security: max-age=31536000
request-id: ***
client-request-id: ***
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"AM4PEPF0001511C"}}
Date: Thu, 30 Jun 2022 15:04:52 GMT
At C:\Users\user\OneDrive\Documents\GIT\m365-gender-pronoun-kit\src\Set-ProfileCardPronoun.ps1:46 char:11
}:HttpRequestMessage) [Invoke-MgGraphRequest], HttpResponseException
Any ideas?
The text was updated successfully, but these errors were encountered: