-
Notifications
You must be signed in to change notification settings - Fork 240
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
Unable to set custom CSS branding #2463
Comments
Thanks for raising this @i-am-shodan Any chance you can post the question at the link below? Unfortunately, as this repo is mainly intended for SDK related issues and as there is no REST API documentation as to how to update this property, we may need guidance of the API owners here. It would be great if you could post back the link of the same so that anyone who comes across this may also follow it up. |
Looking at this it does look like the SDK is using the wrong logic https://learn.microsoft.com/en-us/graph/api/organizationalbranding-update?view=graph-rest-1.0&tabs=http |
Then the URI I get out it is https://graph.microsoft.com/v1.0/organization/[tenant]/branding/customCSS The docs say to use the following URI for stream types - which customcss is. Which also matches what the error message is saying.
So I think this is a SDK problem |
Yes this is a SDK problem. Here is the code required. Note this is almost exactly the same issue as microsoftgraph/msgraph-beta-sdk-dotnet#653. The SDK is sending:
|
Thanks for the extra information, could you confirm that the following works out? It looks like the latest versions of the SDK have the relevant request builders to make the request as below. using var ms = new MemoryStream();
var response = await graphClient.Organization["tenantId"].Branding.Localizations["0"].CustomCSS.PutAsync(ms, "text/css"); |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
Describe the bug
I want to set Custom CSS branding with the MS Graph API. The branding object has setters for a byte[] containing css but I get an exception when trying to set this. See below for example code
Expected behavior
How to reproduce
SDK Version
5.30.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```The text was updated successfully, but these errors were encountered: