aaarianme
aaarianme
CC#
Created by aaarianme on 9/14/2023 in #help
❔ Sharepoint REST API 401 Error
I'm using MSAL Node get token interactive in my electron to get an access token that will be appended to my calls Bearer JWT TOKEN HERE when I make REST calls to Sharepoint but I'm getting this error 401 : "Exception of type 'Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException' was thrown." I checked the scopes and my scopes are good. Anyone knows what is going on
2 replies
CC#
Created by aaarianme on 6/13/2023 in #help
❔ Sharepoint CSOM API Scopes on Azure AD
2 replies
CC#
Created by aaarianme on 6/12/2023 in #help
❔ Graph Service Client with Sharepoint
Im silently logging the user using their signed-in account on windows. i ask for the follwoing permissions :
""User.Read" "Files.ReadWrite.All", "Sites.ReadWrite.All", "Sites.Manage.All"
""User.Read" "Files.ReadWrite.All", "Sites.ReadWrite.All", "Sites.Manage.All"
When i get a site by its root Id I can see the name of the site and the last modified date but not the lists and the users involved. Site lists shows null. anyone knows why? Also I do have delegated permissions added on the app registration on azure portal
var res = await graphServiceClient.Sites["my site id"].GetAsync(); // I am able to see the site name and last modified date


var lists = res.Lists; //This is null even though the iste does have 3 lists in it
var res = await graphServiceClient.Sites["my site id"].GetAsync(); // I am able to see the site name and last modified date


var lists = res.Lists; //This is null even though the iste does have 3 lists in it
5 replies
CC#
Created by aaarianme on 2/9/2023 in #help
❔ Saving Images to the database on azure
For my web app i need to save images. my app is hosted on azure back end is asp.net core. when an image gets uploaded should i cast to to base64 and save it on mysql azure database or should i save the actual image on azure and save the path to reference it? where on azure would i be able to store it?
11 replies
CC#
Created by aaarianme on 2/8/2023 in #help
❔ SQL Timeout Error Deployed ASP.NET Core app
i just deployed my web app with react and .net core and it runs locally but when i run it on the server i get this error TimeoutException: The operation has timed out. Unknown location
MySqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
MySql.Data.Common.StreamCreator.GetTcpStream(MySqlConnectionStringBuilder settings, ref MyNetworkStream networkStream)

MySqlException: Unable to connect to any of the specified MySQL hosts.
MySql.Data.MySqlClient.NativeDriver.Open()
MySqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
MySql.Data.Common.StreamCreator.GetTcpStream(MySqlConnectionStringBuilder settings, ref MyNetworkStream networkStream)

MySqlException: Unable to connect to any of the specified MySQL hosts.
MySql.Data.MySqlClient.NativeDriver.Open()
https://sptwebapp.azurewebsites.net/login/master anyone knows why
9 replies
CC#
Created by aaarianme on 2/1/2023 in #help
❔ .Net Core API User.FindFirstValue(ClaimTypes.NameIdentifier) in every action?!
Hi everyone I have the end point below
[HttpPost, Route("stores/new"), Authorize(policy: "client")]
public async Task<IActionResult> AddNewStore(NewStoreRequestDto store)
{
int userId = int.Parse(User.FindFirstValue(ClaimTypes.NameIdentifier));
//do something
}
[HttpPost, Route("stores/new"), Authorize(policy: "client")]
public async Task<IActionResult> AddNewStore(NewStoreRequestDto store)
{
int userId = int.Parse(User.FindFirstValue(ClaimTypes.NameIdentifier));
//do something
}
now the line where i get the userId is being repeated in every action where i need the userId. is there a better way to have this value saved globally or in the controller scope or something?
13 replies